Page MenuHomeFreeBSD

md5: fix *sum -c with missing files
ClosedPublic

Authored by kevans on Nov 12 2022, 1:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 24, 1:45 PM
Unknown Object (File)
Tue, Apr 22, 4:47 PM
Unknown Object (File)
Mon, Apr 21, 2:51 AM
Unknown Object (File)
Sun, Apr 20, 9:50 AM
Unknown Object (File)
Sun, Apr 20, 4:07 AM
Unknown Object (File)
Sat, Apr 19, 8:23 AM
Unknown Object (File)
Tue, Apr 15, 8:13 PM
Unknown Object (File)
Feb 28 2025, 1:40 PM
Subscribers

Details

Summary

If we fail to open one of the files in the file listing, we still need
to advance rec along with argv so that the checksum we're checking
against lines up with the file we're hashing.

Tests added both for the -c flag, as well as the -b and -t modes of
the *sum programs.

PR: 267722

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste added inline comments.
sbin/md5/tests/md5_test.sh
48–50

can just invoke sha256 a b c instead? or, perhaps even just create expected and sums with explicit content?

This revision is now accepted and ready to land.Nov 12 2022, 2:03 AM
This revision was automatically updated to reflect the committed changes.