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

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

[debbugs-tracker] bug#21757: closed (md5sum: Accept different line endin


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#21757: closed (md5sum: Accept different line endings in .md5 files)
Date: Mon, 26 Oct 2015 01:52:02 +0000

Your message dated Mon, 26 Oct 2015 01:51:10 +0000
with message-id <address@hidden>
and subject line Re: bug#21757: md5sum: Accept different line endings in .md5 
files
has caused the debbugs.gnu.org bug report #21757,
regarding md5sum: Accept different line endings in .md5 files
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
21757: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21757
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: md5sum: Accept different line endings in .md5 files Date: Sun, 25 Oct 2015 19:05:56 +0100 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 Currently, "md5sum -c" gives a cryptic error when the line endings in the .md5 file are not LF (\x0A). It would be helpful if md5sum would just "do the right" and understand the 2 other newline standards.

.md5 files created on non-Unix systems may use line endings other than LF . Windows uses CRLF (\x0D\x0A), and maybe some Mac utility still uses CR (\x0D).

The error message is cryptic in a Linux terminal with CRLF files, because it overwrites the file name, since it just prints out the CR character:

    $ md5sum -w -c Some_File_From_Windows.md5
    : No such file or directoryWindows.mxf
    : FAILED open or readndows.mxf
    md5sum: WARNING: 1 listed file could not be read





--- End Message ---
--- Begin Message --- Subject: Re: bug#21757: md5sum: Accept different line endings in .md5 files Date: Mon, 26 Oct 2015 01:51:10 +0000 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
On 25/10/15 18:05, MI wrote:
> Currently, "md5sum -c" gives a cryptic error when the line endings in the 
> .md5 file 
> are not LF (\x0A). It would be helpful if md5sum would just "do the right" 
> and 
> understand the 2 other newline standards.
> 
> .md5 files created on non-Unix systems may use line endings other than LF . 
> Windows 
> uses CRLF (\x0D\x0A), and maybe some Mac utility still uses CR (\x0D).
> 
> The error message is cryptic in a Linux terminal with CRLF files, because it 
> overwrites the file name, since it just prints out the CR character:
> 
>      $ md5sum -w -c Some_File_From_Windows.md5
>      : No such file or directoryWindows.mxf
>      : FAILED open or readndows.mxf
>      md5sum: WARNING: 1 listed file could not be read

This is mainly a quoting issue.  With the attached patch,
the much more obvious error is output:

  md5sum: ‘...Windows.mxf\r’: No such file or directory
  ‘...Windows.mxf\r’: FAILED open or read
  md5sum: WARNING: 1 listed file could not be read

As for special case handling of '\r', it's probably best not
to do that as it would introduce edge case issues for --check.
I.E. note supporting file names with '\r' chars, or incorrectly
validating an attacker that did:

  cp name name$'\r'
  echo attack > name

cheers,
Pádraig.

Attachment: md5sum-quote.patch
Description: Text Data


--- End Message ---

reply via email to

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