bug-gnu-utils
[Top][All Lists]
Advanced

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

Bug in shar: MD5SUMs are not checked because of a not standard LC_ALL ad


From: Martin Scharrer
Subject: Bug in shar: MD5SUMs are not checked because of a not standard LC_ALL address@hidden
Date: Tue, 10 Feb 2004 19:57:19 +0100
User-agent: KMail/1.5.4

Hallo Gnu-People,

I'm useing shar ( shar - GNU sharutils 4.2.1 ) under Gentoo Linux (Kernel 
2.4.22) with german setting: LC_ALL=de_DE (<- that's the problem) and I found 
a little bug:


FAILURE:
I detected that no MD5SUM checks are made on my machine, when the archive is 
executed.

MY EXPLANATION:
The problem is caused by this if-instruction (with is automatic generated by 
shar) when the user has set LC_ALL to a local value (f.e.: de_DE):

  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'test:' 'MD5 check failed'
d41d8cd98f00b204e9800998ecf8427e  test
SHAR_EOF

Look to the first line to the use of "grep":
grep 'sage: md5sum \['

which should catch the words "Usage: md5sum ["
but with LC_ALL=de_DE (german) this line is printed by md5sum in this way:
Aufruf: md5sum [OPTION]

I think this if-instruction is a (funny?) version check of md5sum. Because the 
different lanuage the check go wrong and no md5 check is executed although 
the version of md5sum is ok.

FIX:
If you add a "LC_ALL=C" line before the if-statement in the shar-archive the 
problem will not appear.


Greetings
Martin Scharrer













reply via email to

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