bin/103845: sha256 /dev/acd0 returns immediately
bde at zeta.org.au
Sat Sep 30 08:40:26 PDT 2006
The following reply was made to PR bin/103845; it has been noted by GNATS.
From: Bruce Evans <bde at zeta.org.au>
To: Ruslan Ermilov <ru at FreeBSD.org>
Cc: Helmut Schellong <var at schellong.biz>, freebsd-gnats-submit at 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
> $ 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.
- md5 on a symlink follows the symlink so md5 on the symlink itself is
- md5 on a named pipe fails with a seek error
- md5 on one of the irregular regular files in /proc sees an empty file.
More information about the freebsd-bugs