Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cpio(4) — DG/UX 5.4.2T

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat(2)

cpio(1)

find(1)



cpio(4)                    C2 Trusted DG/UX 5.4.2T                   cpio(4)


NAME
       cpio - format of cpio archive

DESCRIPTION
       On a Trusted DG/UX® system, when cpio(1) is used with the -oZ options
       but not the -c option, the header structure of the resulting cpio
       archive is:

       struct hdrcpio {
                       short   hmagic,
                               hdev;
                       ushort  hino,
                               hmode,
                               huid,
                               hgid;
                       short   hnlink,
                               hrdev,
                               hmtime[2],
                               hnamesize,
                               hfilesize[2];
                       char    hname[hnamesize rounded to word];
       } Hdr;

       When the -c and -Z options are used, the header information is
       described by:

              sscanf(Chdr,"%6o%6o%6o%6o%6o%6o%6o%6o%11lo%6o%11lo%s",
                      &Hdr.h_magic, &Hdr.h_dev, &Hdr.h_ino, &Hdr.h_mode,
                      &Hdr.h_uid, &Hdr.h_gid, &Hdr.h_nlink, &Hdr.h_rdev,
                      &Longtime, &Hdr.h_namesize,&Longfile,Hdr.h_name);

       Longtime and Longfile are equivalent to Hdr.hmtime and
       Hdr.hfilesize, respectively.  The contents of each file are recorded
       in an element of the array of varying length structures, archive,
       with other items describing the file.  Every instance of hmagic
       contains the constant 070707 (octal).  The items hdev through
       hmtime have meanings explained in stat(2).  The length of the null-
       terminated path name hname, including the null byte, is given by
       hnamesize.

       The last record of the archive always contains the name TRAILER!!!.
       Special files, directories, and the trailer are recorded with
       hfilesize equal to zero.

       For Trusted DG/UX, the following information applies to Trusted cpio
       binary archives.

       The Trusted binary format constants and structures are defined in
       <dgtarchives.h>.

       All records in the Trusted binary format are aligned to 32-bit word
       boundaries.





Licensed material--property of copyright holder(s)                         1




cpio(4)                    C2 Trusted DG/UX 5.4.2T                   cpio(4)


       The Trusted binary format consists of a site security attribute
       section followed by one or more file sections.  The site security
       attribute section is written to the output file every time cpio -o is
       invoked.  The site security attribute section consists of a header,
       optionally followed by a number of attributes:

       typedef
       struct {
              unsigned short          tmagic;        /* SECBHDRMAGIC */
              dgtcpiobinhdrtype   ttype;         /* SECBHDRHDR0  */
              dgtcpiobinhdrrev    trev;          /* SECBHDRREVCURRENT */
              short                   tnattrs;
              }
           /*<----------------*/
              dgtcpiobinhdr;
           /*>----------------*/

       tnattrs is the number of site security attributes that follow the
       site security header.  A site security attribute consists of an
       attribute header record which describes the attribute and its length
       in bytes.  The attribute itself immediately follows the attribute
       header record.

       typedef
       struct {
              dgtcpioattrtype      type;
              ssizet                 size;
              }
           /*<-------------*/
              dgtcpioattr;
           /*>-------------*/


























Licensed material--property of copyright holder(s)                         2




cpio(4)                    C2 Trusted DG/UX 5.4.2T                   cpio(4)


       A file section consists of an identifying header, followed by a
       second informational header optionally followed by a number of
       attributes, the pathname and finally the file contents.

       typedef
       struct {
              unsigned short          tmagic;        /* SECBHDRMAGIC */
              dgtcpiobinhdrtype   ttype;         /* SECBHDRHDR0  */
              dgtcpiobinhdrrev    trev;          /* SECBHDRREVCURRENT */
              short                   tnattrs;
              }
           /*<----------------*/
              dgtcpiobinhdr;
           /*>----------------*/


       typedef
       struct {
              devt                   tdev;
              inot                   tino;
              modet                  tmode;
              uidt                   tuid;
              gidt                   tgid;
              nlinkt                 tnlink;
              devt                   trdev;
              timet                  tmtime;

              /*
               *  The pathname immediately follows the last attribute
               *  following this header.
               */

              ssizet                 tnamesize;

              /*
               *  The file contents should immediately follow the pathname.
               */

              dgtcpiofilesizet     tfilesize;

              unsigned char           tufiasubtype;
              unsigned char           tufiasecpattrs;
              unsigned char           reservedbyte[2];
              modet                  textendedmode;
              unsigned long           tmaxcpdblocks;
              unsigned long           tmaxcpdfilenodes;
              }
           /*<-------------------*/
              dgtcpiobinhdrest;
           /*>-------------------*/







Licensed material--property of copyright holder(s)                         3




cpio(4)                    C2 Trusted DG/UX 5.4.2T                   cpio(4)


       dgtcpiobinhdr.tnattrs is the number of file security attributes
       that follow the second (informative) file section header.  A file
       security attribute consists of an attribute header record which
       describes the attribute and its length in bytes.  The file security
       attribute immediately follows the file security attribute header
       record.

       typedef
       struct {
              dgtcpioattrtype      type;
              ssizet                 size;
              }
           /*<-------------*/
              dgtcpioattr;
           /*>-------------*/

       The pathname follows (dg_tcpio_bin_hdrest.t_namesize bytes long),
       followed by the file contents (dg_tcpio_bin_hdrest.t_filesize bytes
       long).

FILES
       /usr/include/archives.h
       /usr/include/dgtarchives.h.

NOTES
       The find(1) command does not support the Trusted cpio(4) archive
       format.

SEE ALSO
       stat(2),
       cpio(1), find(1).


























Licensed material--property of copyright holder(s)                         4


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026