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)
Sat, May 11, 6:05 PM
Unknown Object (File)
Mar 22 2024, 9:43 PM
Unknown Object (File)
Mar 22 2024, 9:43 PM
Unknown Object (File)
Mar 22 2024, 9:43 PM
Unknown Object (File)
Mar 8 2024, 3:26 AM
Unknown Object (File)
Jan 4 2024, 3:15 PM
Unknown Object (File)
Jan 4 2024, 3:15 PM
Unknown Object (File)
Jan 4 2024, 3:15 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.