Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jun 2004 10:20:18 GMT
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-i386@FreeBSD.org
Subject:   Re: i386/67773: 5.x series - md5 on dev no longer works e.g. md5 /dev/ad2
Message-ID:  <200406101020.i5AAKIm8039082@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/67773; it has been noted by GNATS.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406101020.i5AAKIm8039082>