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)
Sun, Dec 28, 3:45 AM
Unknown Object (File)
Sat, Dec 27, 2:29 PM
Unknown Object (File)
Sun, Dec 14, 4:52 AM
Unknown Object (File)
Sat, Dec 13, 6:28 PM
Unknown Object (File)
Thu, Dec 11, 3:43 PM
Unknown Object (File)
Nov 29 2025, 1:24 AM
Unknown Object (File)
Nov 8 2025, 9:24 PM
Unknown Object (File)
Oct 23 2025, 5:06 AM
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.