freebsd-dev/sbin/md5
Stefan Eßer 9f3aa538e3 sbin/md5.c: fix -q -c for BSD style versions
The BSD style commands (with names not ending in "sum") ignored the -c
options and the passed digest value when invoked with -q.

The man page stated that -q causes only the calculated digest to be
printed, but did not consider the case of both the -q and -c being
used in combination.

Since there is no warning that -c will be ignored when the -q option
is used, users night (and did) expect that the exit code would reflect
the matching of the calculated digest and the argument passed with -c.

This update implements and documents this expected behavior.

PR:		265461
Reported by:	Dmitrij <bugs.freebsd@1fff.net>
MFC after:	2 weeks
2022-07-26 23:04:57 +02:00
..
tests sbin/md5: fix test case to not write outside temp directory 2021-06-25 10:37:51 +02:00
Makefile sbin/md5: re-enable tests 2021-06-25 12:41:14 +02:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
md5.1 sbin/md5.c: fix -q -c for BSD style versions 2022-07-26 23:04:57 +02:00
md5.c sbin/md5.c: fix -q -c for BSD style versions 2022-07-26 23:04:57 +02:00