From nobody@FreeBSD.org  Thu Jun 10 02:18:41 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8453B16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 10 Jun 2004 02:18:41 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 65E9F43D39
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 10 Jun 2004 02:18:41 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i5A2IfhD034851
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 10 Jun 2004 02:18:41 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i5A2IfNe034850;
	Thu, 10 Jun 2004 02:18:41 GMT
	(envelope-from nobody)
Message-Id: <200406100218.i5A2IfNe034850@www.freebsd.org>
Date: Thu, 10 Jun 2004 02:18:41 GMT
From: Dan Fletcher <drfmail@swbell.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: 5.x series - md5 on dev no longer works e.g. md5 /dev/ad2
X-Send-Pr-Version: www-2.3

>Number:         67773
>Category:       i386
>Synopsis:       5.x series - md5 on dev no longer works e.g. md5 /dev/ad2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    remko
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 10 02:20:20 GMT 2004
>Closed-Date:    Fri Apr 06 06:27:29 GMT 2007
>Last-Modified:  Fri Apr 06 06:27:29 GMT 2007
>Originator:     Dan Fletcher
>Release:        5.2.1
>Organization:
Law Enforcement
>Environment:
>Description:
I work computer forensics for a law enforcement agency.  I use FreeBSD extensively.  Tried to upgrade to 5.x series for the SATA support.  However the md5 checksum no longer works on raw devices.  I have tried it with 5.0 and 5.2.1, neither work.

Worked fine with 4.x series.

cksum of a raw device works fine, e.g.
cksum /dev/ad2
>How-To-Repeat:
Try to md5 checksum any raw device:

md5 /dev/fd0
md5 /dev/ad2, etc.
>Fix:
      
>Release-Note:
>Audit-Trail:

From: Michael Johnson <ahze@ahze.net>
To: Dan Fletcher <drfmail@swbell.net>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: i386/67773: 5.x series - md5 on dev no longer works e.g. md5 /dev/ad2
Date: Wed, 9 Jun 2004 22:26:17 -0400

 it works, but I think the md5 sum will be different after each boot 
 (correct me if I'm wrong) because 5.x uses devfs.
 
 Michael
 

From: Bruce Evans <bde@zeta.org.au>
To: Dan Fletcher <drfmail@swbell.net>
Cc: freebsd-gnats-submit@freebsd.org, freebsd-i386@freebsd.org
Subject: Re: i386/67773: 5.x series - md5 on dev no longer works e.g. md5
 /dev/ad2
Date: Thu, 10 Jun 2004 20:17:54 +1000 (EST)

 On Thu, 10 Jun 2004, Dan Fletcher wrote:
 
 > >Description:
 > I work computer forensics for a law enforcement agency.  I use FreeBSD extensively.  Tried to upgrade to 5.x series for the SATA support.  However the md5 checksum no longer works on raw devices.  I have tried it with 5.0 and 5.2.1, neither work.
 >
 > Worked fine with 4.x series.
 >
 > cksum of a raw device works fine, e.g.
 > cksum /dev/ad2
 > >How-To-Repeat:
 > Try to md5 checksum any raw device:
 >
 > md5 /dev/fd0
 > md5 /dev/ad2, etc.
 
 This seems to have been broken in at least rev.1.14 of libmd/mdXhl.c
 by using fstat() to determine a wrong size for the file.  fstat() only
 gives the file size for regular files that don't change while being
 read.  Pipes are handled differently, so the breakage doesn't affect
 them.  Regular files that change while being read aren't handled very
 well anyway.
 
 As a workaround, pipe the file to md5 (e.g., cat /dev/ad2 | md5).
 
 Bruce
State-Changed-From-To: open->feedback 
State-Changed-By: remko 
State-Changed-When: Mon Sep 11 12:58:43 UTC 2006 
State-Changed-Why:  
Hello, 
can you tell me whether this problem got solved and/or is still 
there on recent freebsd versions (6.1 for example?) 
thanks! 


Responsible-Changed-From-To: freebsd-i386->remko 
Responsible-Changed-By: remko 
Responsible-Changed-When: Mon Sep 11 12:58:43 UTC 2006 
Responsible-Changed-Why:  
grab the pr 

http://www.freebsd.org/cgi/query-pr.cgi?pr=67773 
State-Changed-From-To: feedback->closed 
State-Changed-By: remko 
State-Changed-When: Fri Apr 6 06:27:27 UTC 2007 
State-Changed-Why:  
Feedback timeout (Workaround provided) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=67773 
>Unformatted:
