SATINTRPPATHNAME(3) SATINTRPPATHNAME(3)
NAME
satintrppathname - Portable interface to interpret sat_pathname
structs.
SYNOPSIS
#include <sat.h>
int satintrppathname (char **buf, struct satpathname *pn, char
**reqname, char **actname, maclabel **label, int filemajor, int
fileminor);
DESCRIPTION
satintrppathname takes a pointer to a buffer (buf) containing the disk
image of a satpathname 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 satpathname structure includes the following fields:
inot satinode; /* inode number of file */
devt satdevice; /* device no. of mounted file system */
uidt satfileown; /* file owner */
gidt satfilegrp; /* file group */
modet satfilemode; /* 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 satmacenabled 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 satmacenabled is set in the file
header, otherwise this field will be NULL. To avoid possible problems if
trailing data happens to resemble a maclabel, do not ask for the file
label unless satmacenabled is set in the file header.
Page 1
SATINTRPPATHNAME(3) SATINTRPPATHNAME(3)
DIAGNOSTICS
satreadheaderinfo returns 0 on success or -1 if the satpathname
struct is not valid. In this case, an error message is displayed on
stderr.
SEE ALSO
free(3C), satreadfileinfo(3), satreadheaderinfo(3).
Page 2