emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#62403: closed (checksums --check (sha256sum, sha1sum) return file: O


From: GNU bug Tracking System
Subject: bug#62403: closed (checksums --check (sha256sum, sha1sum) return file: OK when they shouldn't)
Date: Thu, 23 Mar 2023 12:44:01 +0000

Your message dated Thu, 23 Mar 2023 12:43:04 +0000
with message-id <e1211530-2946-cf5a-191e-4ed6709f8916@draigBrady.com>
and subject line Re: bug#62403: checksums --check (sha256sum, sha1sum) return 
file: OK when they shouldn't
has caused the debbugs.gnu.org bug report #62403,
regarding checksums --check (sha256sum, sha1sum) return file: OK when they 
shouldn't
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
62403: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62403
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: checksums --check (sha256sum, sha1sum) return file: OK when they shouldn't Date: Thu, 23 Mar 2023 10:32:53 +0100
Hello,

This report was first found on r/archlinux:

% echo "123" > 1
% echo "1234" > 2
% echo "abc" > 3
% sha256sum 1 2 3 > sums.sha256
% sha1sum 1 2 3 > sums.sha1
% echo "123" > 2 # break file 2

% sha256sum -c sums.sha256 # returns 2: OK (incorrect)
% sha1sum -c sums.sha1 # returns 2: OK

% tail -n 2 sums.sha256 | sha256sum -c # returns 2: FAILED (correct)
% tail -n 2 sums.sha1 | sha1sum -c # returns 2: FAILED

See https://redd.it/11zdecf .

Someone pointed at this commit, though I'm unable to confirm that:
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=b319685c6e12e66bf357c2384fe69f1c63f66aed

% sha256sum --version
sha256sum (GNU coreutils) 9.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Ulrich Drepper, Scott Miller, and David Madore.

Best regards,



--- End Message ---
--- Begin Message --- Subject: Re: bug#62403: checksums --check (sha256sum, sha1sum) return file: OK when they shouldn't Date: Thu, 23 Mar 2023 12:43:04 +0000 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Thunderbird/109.0
On 23/03/2023 09:32, Moviuro via GNU coreutils Bug Reports wrote:
Hello,

This report was first found on r/archlinux:

% echo "123" > 1
% echo "1234" > 2
% echo "abc" > 3
% sha256sum 1 2 3 > sums.sha256
% sha1sum 1 2 3 > sums.sha1
% echo "123" > 2 # break file 2

% sha256sum -c sums.sha256 # returns 2: OK (incorrect)
% sha1sum -c sums.sha1 # returns 2: OK

% tail -n 2 sums.sha256 | sha256sum -c # returns 2: FAILED (correct)
% tail -n 2 sums.sha1 | sha1sum -c # returns 2: FAILED

See https://redd.it/11zdecf .

Someone pointed at this commit, though I'm unable to confirm that:
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=b319685c6e12e66bf357c2384fe69f1c63f66aed

% sha256sum --version
sha256sum (GNU coreutils) 9.2


The attached should fix this.
Sorry for the trouble.
Note the exit status is still OK, and so automated scripts would be unaffected,
but yes reporting the status incorrectly here to the user is a bad bug.

Marking this as done.

thanks,
Pádraig

Attachment: cksum-9.2-status.patch
Description: Text Data


--- End Message ---

reply via email to

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