Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Sep 2006 15:40:25 GMT
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/103845: sha256 /dev/acd0  returns immediately
Message-ID:  <200609301540.k8UFePL0044540@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

The following reply was made to PR bin/103845; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
To: Ruslan Ermilov <ru@FreeBSD.org>
Cc: Helmut Schellong <var@schellong.biz>, freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/103845: sha256 /dev/acd0  returns immediately
Date: Sun, 1 Oct 2006 01:30:33 +1000 (EST)

 On Sat, 30 Sep 2006, Ruslan Ermilov wrote:
 
 > On Sat, Sep 30, 2006 at 09:51:45PM +1000, Bruce Evans wrote:
 >>
 >> md5(1) and friends haven't worked for files specified on the command
 >> line since 2001.
 >>
 > I think you meant to say "for device special files".
 
 I meant "for most types of files, if the files are specified on the
 command line".
 
 > $ md5 /bin/cat /bin/cp
 > MD5 (/bin/cat) = 51c9c34f1d2db0f73d043929556a687b
 > MD5 (/bin/cp) = b456419be246512f9fe3ac1cd4219331
 
 Of course it still works for the usual case :-).
 
 >> At least for md5, this is due to a bug in libmd.
 >> MDXFileChunk() has been used to implement MDXFile() since 2001, but
 >> MDXFileChunk() cannot be used for this since it assumes that the file
 >> is a regular file (or perhaps a symlink) so that st_size is valid and
 >> the file is seekable.
 
 More details:
 - md5 on a symlink follows the symlink so md5 on the symlink itself is
    not supported
 - md5 on a named pipe fails with a seek error
 - md5 on one of the irregular regular files in /proc sees an empty file.
 
 Bruce



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