Date: Sun, 24 Jun 2001 19:43:40 +0300 From: Valentin Nechayev <netch@iv.nn.kiev.ua> To: Stephen Montgomery-Smith <stephen@math.missouri.edu> Cc: freebsd-stable@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: Problems with md5 -p Message-ID: <20010624194339.A717@iv.nn.kiev.ua> In-Reply-To: <3B35F852.2290E18F@math.missouri.edu>; from stephen@math.missouri.edu on Sun, Jun 24, 2001 at 09:25:22AM -0500 References: <3B35F852.2290E18F@math.missouri.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Sun, Jun 24, 2001 at 09:25:22, stephen (Stephen Montgomery-Smith) wrote about "Problems with md5 -p": I reproduce it stably on my -current. The second checksum is constant and it is MD5 checksum of an empty stream: root@iv:/usr/HEAD/src/sbin/md5##md5 </dev/null d41d8cd98f00b204e9800998ecf8427e A fix: --- md5.c.orig Mon Jun 4 00:38:02 2001 +++ md5.c Sun Jun 24 19:37:13 2001 @@ -65,7 +65,7 @@ switch (ch) { case 'p': MDFilter(1); - break; + exit(0); case 'q': qflag = 1; break; This avoids determination of other options, but this does not conflict directly with man page. Moreover such exit(0) should be applied not only with -p, but also with -x, -t and -s: all these options should not gather any input files. Patch is trivial. > Suppose I have a file xxx. If I type > > md5 -p < xxx > > it should return the contents of the file followed by its md5 number: > > Some junk in the file > > 334911f8bcde69fe8edac561197e876f > > But now I get two numbers: > > Some junk in the file > > 334911f8bcde69fe8edac561197e876f > d41d8cd98f00b204e9800998ecf8427e > > This is using FreeBSD stable of June 16. (Maybe this has been fixed > more recently - please tell me of it has. It is a bit tricky for me to > update sources because I use CTM which has been out recently - probably > for just this very reason. But if I know the problem has been fixed > then I will go through the effort of using cvsup.) /netch To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010624194339.A717>