diff options
author | Lawrence Teo <lteo@cvs.openbsd.org> | 2014-03-26 03:16:40 +0000 |
---|---|---|
committer | Lawrence Teo <lteo@cvs.openbsd.org> | 2014-03-26 03:16:40 +0000 |
commit | 4721cd9cebe0ecdd01a7211c091ce9fa10e09283 (patch) | |
tree | 8a0ea1cf74595843e4ea088ae8ca94ac43f3dfb2 /bin | |
parent | 7fc2b81405801aadc490b2b5819227c1e5ae93c7 (diff) |
Ignore the -b option if cksum is called as-is (e.g. "cksum -b /bsd")
as documented on the cksum(1) man page.
"looks right" deraadt@
ok millert@
Diffstat (limited to 'bin')
-rw-r--r-- | bin/md5/md5.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/md5/md5.c b/bin/md5/md5.c index bd9fd597102..270ea92be91 100644 --- a/bin/md5/md5.c +++ b/bin/md5/md5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md5.c,v 1.74 2014/03/20 22:03:56 tedu Exp $ */ +/* $OpenBSD: md5.c,v 1.75 2014/03/26 03:16:39 lteo Exp $ */ /* * Copyright (c) 2001,2003,2005-2007,2010,2013,2014 @@ -330,7 +330,7 @@ main(int argc, char **argv) } if (hf->name == NULL) hf = &functions[0]; /* default to cksum */ - hash_insert(&hl, hf, bflag); + hash_insert(&hl, hf, (hf->base64 == -1 ? 0 : bflag)); } if (rflag || qflag) { |