System calls are available to get the SLD name, get MLD adornment, and get SLD or MLD file attribute information.
The getsldname(2) system call gets the SLD name for path_name at the specified slabel. Refer to the getsldname(2) man page. The fgetsldname(2) system call uses a file descriptor.
int getsldname(const char *path_name, const bslabel_t *slabel, char *name_buf, const int len); int fgetsldname(const int fd, const bslabel_t *slabel_p, char *name_buf, const int len);
The getmldadorn(2) system call gets the fully adorned path name for path_name. The fgetmldadorn(2) system call uses a file descriptor. Refer to the getmldadorn(2) man page.
int getmldadorn(const char *path_name, char *adorn_buf[MLD_ADORN_MAX]); int fgetmldadorn(const int fd, char adorn_buf[MLD_ADORN_MAX]);
The mldstat(3TSOL) system call returns file attribute information on the MLD specified by path_name. The mldlstat(3TSOL) system call returns information on the MLD symbolic link.
int mldstat(const char *path_name, struct stat *stat_buf); int mldlstat(const char *path_name, struct stat *stat_buf);
These system calls are described in "Get and Set File System Security Attribute Flags" in Chapter 2, Getting Started. Also, refer to the getfattrflag(2) man page.
int mldgetfattrflag(const char *path, secflgs_t *flags); int mldsetfattrflag(const char * path, secflgs_t which, secflgs_t flags);