NAME | SYNOPSIS | DESCRIPTION | ATTRIBUTES | RETURN VALUES | ERRORS | SEE ALSO | WARNINGS
#include <sys/param.h> #include <tsol/mld.h>char * mldrealpath(const char * path , char * resolved_path);
#include <tsol/label.h>char * mldrealpathl(const char * path , char * resolved_path, const bslabel_t * sl);
mldrealpath() expands all symbolic links and resolves references to '/./', '/../', extra '/' characters, and MLD translations in the NULL terminated string named by path and stores the canonicalized absolute pathname in the buffer named by resolved_path . The resulting path will have no symbolic links components, nor any '/./', '/../', nor any unadorned MLD s, nor any hidden SLD names for single level directories at the present sensitivity label.
mldrealpathl()
operates the same as
mldrealpath()
except the
SLD
name is relative to the sensitivity label
sl
. To specify a sensitivity label for an
SLD
name which does
not exist, the process must assert either the
PRIV_FILE_UPGRADE_SL
or
PRIV_FILE_DOWNGRADE_SL
privilege depending on whether the specified sensitivity label dominates or does not dominate the process sensitivity label.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Availability | SUNWtsu |
MT-Level | MT-Safe |
mldrealpath() returns a pointer to the resolved_path on success. On failure, it returns NULL , sets errno to indicate the error, and places in resolved_path the absolute pathname of the path component which could not be resolved.
Search permission is denied for a component of the path prefix of path .
resolved_path extends outside the process's allocated address space.
Too many symbolic links were encountered in translating path .
path or resolved_path was NULL .
An I/O error occurred while reading from or writing to the file system.
The named file does not exist.
The length of the path argument exceeds PATH_MAX .
A pathname component is longer than NAME_MAX (see sysconf(3) ) while _POSIX_NO_TRUNC is in effect (see pathconf(2) ).
It indirectly invokes the readlink(2) system call and mldgetwd(3) library call (for relative path names), and hence inherits the possibility of hanging due to inaccessible file system resources.
NAME | SYNOPSIS | DESCRIPTION | ATTRIBUTES | RETURN VALUES | ERRORS | SEE ALSO | WARNINGS