NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | WARNINGS | SEE ALSO
#include <tsol/mld.h>int getmldadorn(char * path_name, char adorn_buf [MLD_ADORN_MAX]);
getmldadorn() returns the MLD adornment of the file system on which path_name resides. path_name is the path name of any file within the mounted filesystem. adorn_buf is a pointer to a buffer of at least MLD_ADORN_MAX bytes in which the null-terminated MLD adornment is returned.
fgetmldadorn() returns the same information about an open file referred to by descriptor fd .
The information label of path_name or fd is unchanged. The information label of the calling process is also unchanged.
getmldadorn() and fgetmldadorn() return:
On success.
On failure and set errno to indicate the error.
getmldadorn() fails if one or more of the following are true:
Search permission is denied for a component of the path prefix of
path_name
. To override this restriction, the calling process may assert the
PRIV_FILE_DAC_SEARCH
privilege and/or the
PRIV_FILE_MAC_SEARCH
privilege.
adorn_buf or path_name points to an invalid address.
An I/O error occurred while reading from or writing to the file system.
Too many symbolic links were encountered in translating path_name .
The length of the path argument exceeds PATH_MAX .
A pathname component is longer than NAME_MAX (see sysconf(3C) ) while _POSIX_NO_TRUNC is in effect (see pathconf(2) ).
The file referred to by path_name does not exist.
A component of the path prefix of path_name is not a directory.
fgetmldadorn() fails if one or more of the following are true:
fd is not a valid open file descriptor.
adorn_buf points to an invalid address.
fd refers to a socket, not a file.
An I/O error occurred while reading from the file system.
If the filesystem of the fd does not support MLD s and no mld_prefix attribute was specified at mount time, no error is returned, and a zero-length string is returned in the adorn_buf buffer.
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | WARNINGS | SEE ALSO