sat_intrp_pathname(3)

sat_intrp_pathname - Portable interface to interpret sat_pathname structs.

As shipped in IRIX 6.5.7. Unchanged since IRIX 6.5.

NAME
     sat_intrp_pathname - Portable interface to interpret sat_pathname
     structs.

SYNOPSIS
     #include <sat.h>

     int sat_intrp_pathname (char **buf, struct sat_pathname *pn, char
          **reqname, char **actname, mac_label **label, int file_major, int
          file_minor);

DESCRIPTION
     sat_intrp_pathname takes a pointer to a buffer (buf) containing the disk
     image of a sat_pathname structure.  It unpacks the variable length
     portions of the struct from buf and returns them in the specified
     arguments.  A pointer to the data following the pathname information is
     returned in buf.

     The sat_pathname structure includes the following fields:

          ino_t   sat_inode;       /* inode number of file */
          dev_t   sat_device;      /* device no. of mounted file system */
          uid_t   sat_fileown;     /* file owner */
          gid_t   sat_filegrp;     /* file group */
          mode_t  sat_filemode;    /* file mode, including file type */

     Additional data is appended to the struct in the disk format.  This
     informtaion is returned in the arguments as follows:

     reqname        The pathname that the system call specified

     actname        The pathname that the the system actually looked up,
                    including crossed mount points, symbolic links, and
                    multi-level directories.

     label          The security label of the file.  It is preferred, but not
                    required, to only specify this field if sat_mac_enabled is
                    set in the file header.

     If any of these fields are NULL, the related information will not be
     returned.  If these fields are non-null (i.e. they represent the address
     of a suitable pointer), sufficient storage will be allocated to hold the
     values.  These fields should be freed (see free(3)) when they are no
     longer needed.

     The file label is only available if sat_mac_enabled is set in the file
     header, otherwise this field will be NULL.  To avoid possible problems if
     trailing data happens to resemble a mac_label, do not ask for the file
     label unless sat_mac_enabled is set in the file header.
DIAGNOSTICS
     sat_read_header_info returns 0 on success or -1 if the sat_pathname
     struct is not valid.  In this case, an error message is displayed on
     stderr.

SEE ALSO
     free(3C), sat_read_file_info(3), sat_read_header_info(3).