[comp.sys.att] <sys/dir.h> braindamaged?

brant@manta.pha.pa.us (Brant Cheikes) (06/16/89)

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@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@manta.pha.pa.us, brant@linc.cis.upenn.edu, bpa!manta!brant

les@chinet.chi.il.us (Leslie Mikesell) (06/22/89)

In article <485@manta.pha.pa.us> brant@manta.pha.pa.us (Brant Cheikes) writes:

>[an aside: I'd like to hear from any UNIXpc folks who are either
>working on or using GNU tar.]

Version 1.07 contains some comments about the unix pc so perhaps it
has been tested there.  It seems to compile if you do the obvious
things:
use the USG entry in the Makefile, deleting the references to
   rtape_lib.c and rtape_lib.$O in the LOCAL_??? lines.
modify port.c to
#define WANT_MKDIR
#define WANT_FTRUNCATE
#define WANT_GETWD
#undef WANT_GETOPT (this is defined a few lines down from the USG stuff)

Les Mikesell