<sys/dir.h> braindamaged?

Brant Cheikes brant at manta.pha.pa.us
Fri Jun 16 13:47:37 AEST 1989


I recently posted an article wondering if 14-char filename strings in
SYSV filesystem directory entries would fail to be null terminated.  I
suspected that this might be a bug.

Quite a few people have written to point out that yes, the UNIX SYSV
directory structure has always been this way: 2 bytes for the inode,
14 bytes for the filename string (16-byte directory structures).  Thus
names of exactly 14 chars will not have a trailing null.  I've
cancelled the original article, to spare those folks away this week at
Usenix.

However, it has been confirmed that the version of Doug Gwyn's dirent
package I snarfed from uunet in February has been superseded.  The new
version fixes a couple of minor bugs, one of which is the mishandling
of 14-char names in SYSV UNIX.  I'm not sure if the new version is on
uunet; Bob Wilber (wilber at research.att.com) was kind enough to send me
his copy (thanks, Bob), and I've put it in manta's anonymous uucp
area in case anyone else wants it (phone (215)662-5301, login "uupub",
password "UUsnarf", 1200 baud UNIXpc OBM),
/usr/spool/pub/dirent.cpio.Z:

-rw-r--r--  1 brant   users     24041 Jun 15 23:18 dirent.cpio.Z

[an aside: I'd like to hear from any UNIXpc folks who are either
working on or using GNU tar.]
-- 
Brant Cheikes
University of Pennsylvania, Department of Computer and Information Science
brant at manta.pha.pa.us, brant at linc.cis.upenn.edu, bpa!manta!brant



More information about the Comp.sys.att mailing list