ACL_GET(3SEC) | File Access Control Library Functions | ACL_GET(3SEC) |
cc [ flag... ] file... -lsec [ library... ] #include <sys/acl.h> int *acl_get(const char *path, int flag, acl_t **aclp);
int *facl_get(int fd, int flag, acl_t **aclp);
int acl_set(const char *path, acl_t *aclp);
int facl_set(int fd, acl_t *aclp);
The acl_set() and facl_set() functions are used for setting an ACL of a file whose name is given by path or referenced by the open file descriptor fd. The aclp argument specifies the ACL to set.
The acl_get() and acl_set() functions support multiple types of ACLs. When possible, the acl_set() function translates an ACL to the target file's style of ACL. Currently this is only possible when translating from a POSIX-draft ACL such as on UFS to a file system that supports NFSv4 ACL semantics such as ZFS or NFSv4.
Upon successful completion, acl_set() and facl_set() return 0. Otherwise, -1 is returned and errno is set to indicate the error.
EACCES
EIO
ENOENT
ENOSYS
ENOTSUP
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Evolving |
MT-Level | MT-Safe |
April 9, 2016 | OmniOS |