From nobody@FreeBSD.ORG  Wed Sep 13 15:27:01 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 3A46237B422; Wed, 13 Sep 2000 15:27:01 -0700 (PDT)
Message-Id: <20000913222701.3A46237B422@hub.freebsd.org>
Date: Wed, 13 Sep 2000 15:27:01 -0700 (PDT)
From: rich@math.missouri.edu
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: /sbin/md5 suggestion
X-Send-Pr-Version: www-1.0

>Number:         21255
>Category:       misc
>Synopsis:       /sbin/md5 suggestion
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    phk
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 13 15:30:00 PDT 2000
>Closed-Date:    Fri Nov 16 14:56:30 PST 2001
>Last-Modified:  Fri Nov 16 14:56:39 PST 2001
>Originator:     rich winkel
>Release:        4.1-release
>Organization:
univ of mo
>Environment:
FreeBSD saks 4.1-RELEASE FreeBSD 4.1-RELEASE #0: Wed Aug  2 12:03:17 CDT 2000
root@saks:/usr/obj/usr/src/sys/saks  i386

>Description:
md5 -p option corrupts stdout pipe data with chksum.  it would be more
useful to output chksum to stderr, so one could do:
tar czBf - dir|md5 -p|ssh otherhost 'md5 -p|tar xzBpf -'
and get two checksums to compare, vs a
"gzip: stdin: decompression OK, trailing garbage ignored"
>How-To-Repeat:

>Fix:
diff -u /usr/src/sbin/md5/md5.c md5.c
--- /usr/src/sbin/md5/md5.c     Fri Dec  3 19:29:43 1999
+++ md5.c       Wed Sep 13 17:12:28 2000
@@ -207,7 +207,7 @@
                        err(1, "stdout");
                MD5Update(&context, buffer, len);
        }
-       printf("%s\n", MD5End(&context,buf));
+       fprintf(stderr, "%s\n", MD5End(&context,buf));
 }
 
 static void


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->phk 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Thu Sep 14 07:34:45 PDT 2000 
Responsible-Changed-Why:  
Personally, I think it's a little late in the game to be changing 
the way this option works, particularly since it's possible 
that many folks already rely on its existing behaviour. 

But we'll hand this over to Poul-Henning, who originally 
brought this option on-board, and let him decide. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21255 

From: Poul-Henning Kamp <phk@critter.freebsd.dk>
To: FreeBSD-gnats-submit@FreeBSD.ORG, rich@math.missouri.edu
Cc:  
Subject: Re: bin/21255: /sbin/md5 suggestion
Date: Sat, 16 Sep 2000 21:40:57 +0200

 The -p option was originally used in the first CTM generator.
 
 I personally don't need it anymore, but I am not sure if we can
 count on nobody else using it.
 
 Suggest we add a new option for it instead.
 
 If you submit a patch (remember manpage) I'll commit it.
 
 Poul-Henning
 
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Fri Nov 16 14:56:30 PST 2001 
State-Changed-Why:  
timed out 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=21255 
>Unformatted:
