| Main index | Section 3 | Options |
#include <sys/mac.h>
The mac_set_proc() function associates the MAC label specified by label to the calling process.
A process is allowed to set a label for a file only if it has MAC write access to the file, and its effective user ID is equal to the owner of the file, or has appropriate privileges.
| [EACCES] | |
| MAC write access to the file is denied. | |
| [EBADF] | |
| The fd argument is not a valid file descriptor. | |
| [EINVAL] | |
| The label argument is not a valid MAC label, or the object referenced by fd is not appropriate for label operations. | |
| [EOPNOTSUPP] | |
| Setting MAC labels is not supported by the file referenced by fd. | |
| [EPERM] | |
| The calling process had insufficient privilege to change the MAC label. | |
| [EROFS] | |
| File system for the object being modified is read only. | |
| [ENAMETOOLONG] | |
| The length of the pathname in path_p exceeds PATH_MAX, or a component of the pathname is longer than NAME_MAX. | |
| [ENOENT] | |
| The file referenced by path_p does not exist. | |
| [ENOTDIR] | |
| A component of the pathname referenced by path_p is not a directory. | |
| MAC_SET (3) | January 14, 2003 |
| Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | Ken Thompson has an automobile which he helped design. Unlike most automobiles, it has neither speedometer, nor gas gauge, nor any of the other numerous idiot lights which plague the modern driver. Rather, if the driver makes a mistake, a giant “?” lights up in the center of the dashboard. “The experienced driver,” says Thompson, “will usually know what's wrong.” | ” |