bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#353911: md5sum --check checks only if _all_ are bad


From: Jim Meyering
Subject: Re: Bug#353911: md5sum --check checks only if _all_ are bad
Date: Wed, 22 Feb 2006 19:37:32 +0100

Paul Eggert <address@hidden> wrote:
...
> I agree that the current behavior is confusing.  I'd prefer it if any
> improperly formatted line caused a nonzero exit status.  Is there some
> reason things are done the way that they are?
>
> At the very least there should be an option to cause an error if the
> input file is improperly formatted.  I think the option should be
> enabled by default.

I think it was designed that way so that you can pipe an announcement
message to `md5sum -c' and not get failures for all of the non-checksum
lines (ask the author, Ulrich Drepper if you want to be sure).  Obviously,
when the input is intended to be *only* checksum/filename pairs, then
the current behavior doesn't make sense.

I think we need a new option to enable the desired behavior.
However, I don't think we can make it the default -- there's
probably too much existing usage that would break as a result
of such a change.

Another (independent) option is be to relax the first-cut checksum line
validation code so that checksum strings tweaked not to contain all
hexadecimal bytes (maybe as long as they're non-white-space) would still
evoke a mismatch error.  Then, substitutions like Dan's s/./Z/ would
not go unnoticed -- but s/./ / would, so this is probably not worthwhile.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]