dsamperi@marob.masa.com (Dominick Samperi) (12/15/89)
Has anyone noticed that the NFS convention of returning uid/gid=-2/-2 (user nobody) under certain circumstances results in a corrupted CPIO dump (due to sign extension, on a Sun3, for example). I imagine that other UNIX utilities are written with the assumption uid >= 0, gid >=0 as well. (This only happens when the CPIO "portability" option, -c, is used.) This happens, for example, when files in a VMS file system are mounted on a UNIX machine, and there is no proxy mapping for the files on the VMS side. This does not appear to be simply another VMS bug, since Sun ships /etc/passwd with a nobody entry, uid/gid=-2/-2. Does the POSIX standard (or any other evolving standard) address this issue? Where can one find these standards documented, particularly the CPIO/TAR standards? -- Dominick Samperi -- Citicorp dsamperi@Citicorp.COM uunet!ccorp!dsamperi
karish@forel.stanford.edu (Chuck Karish) (12/15/89)
In article <2587D93A.19FD@marob.masa.com> dsamperi@marob.masa.com (Dominick Samperi) wrote: >Has anyone noticed that the NFS convention of returning uid/gid=-2/-2 (user >nobody) under certain circumstances results in a corrupted CPIO dump (due >to sign extension, on a Sun3, for example). I imagine that other UNIX >utilities are written with the assumption uid >= 0, gid >=0 as well. >(This only happens when the CPIO "portability" option, -c, is used.) >Does the POSIX standard (or any other evolving standard) address this >issue? The POSIX 1003.1 standard says that the types used for user and group IDs (uid_t and gid_t, respectively) are to be `arithmetic types'. An implementation or application that assumes that that the values are always positive is broken. Data in all POSIX tar and cpio headers are represented in ASCII, as is the case with traditional `cpio -c' archives. >Where can one find these standards documented, particularly the >CPIO/TAR standards? The POSIX 1003.1 standard is published by the IEEE, 345 East 47th Street, New York, NY 10017, USA. Its ISBN is 1-55937-003-3. Tar and cpio archive formats are described in Chapter 10 of the document. The tar, cpio, and pax utilities are covered by the 1003.2 draft standard, available only fron the 1003.2 committee. Chuck Karish karish@mindcraft.com (415) 323-9000 karish@forel.stanford.edu