aboutsummaryrefslogtreecommitdiff
path: root/coreutils/md5_sha1_sum.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-07-05 00:12:55 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-07-05 00:12:55 +0000
commitd166f83d74240e49bcc56ece0b709d773c2e8f62 (patch)
tree0f3d1f75a26b83d935683035f6787580831ae4f5 /coreutils/md5_sha1_sum.c
parent42b3dea9bfb8ac595c71089ee23012f44dd43eb2 (diff)
downloadbusybox-d166f83d74240e49bcc56ece0b709d773c2e8f62.tar.gz
md5_sha1_sum: fix mishandling when run as /bin/md5sum (with path)
chown/chgrp: completely match coreutils 6.8 wrt symlink handling function old new delta recursive_action 411 422 +11 arith 2033 2042 +9 collect_blk 467 474 +7 dhcprelay_main 1122 1125 +3 fsck_main 1909 1911 +2 singlemount 4555 4547 -8 xmalloc_realpath 14 - -14 get_lcm 123 105 -18 ed_main 3111 3084 -27 chown_main 217 183 -34 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 5/4 up/down: 32/-101) Total: -69 bytes text data bss dec hex filename 684132 2744 14000 700876 ab1cc busybox_old 684060 2744 14000 700804 ab184 busybox_unstripped
Diffstat (limited to 'coreutils/md5_sha1_sum.c')
-rw-r--r--coreutils/md5_sha1_sum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index 4523fa4ec..8bc203486 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -84,7 +84,7 @@ int md5_sha1_sum_main(int argc, char **argv)
uint8_t *hash_value;
unsigned flags;
hash_algo_t hash_algo = ENABLE_MD5SUM
- ? (ENABLE_SHA1SUM ? (**argv=='m' ? HASH_MD5 : HASH_SHA1) : HASH_MD5)
+ ? (ENABLE_SHA1SUM ? (applet_name[0] == 'm' ? HASH_MD5 : HASH_SHA1) : HASH_MD5)
: HASH_SHA1;
if (ENABLE_FEATURE_MD5_SHA1_SUM_CHECK)