ACL_STRIP(3SEC) | File Access Control Library Functions | ACL_STRIP(3SEC) |
acl_strip - remove all ACLs from a file
cc [ flag... ] file... -lsec [ library... ] #include <sys/acl.h> int acl_strip(const char *path, uid_t uid, gid_t gid, mode_t mode);
The acl_strip() function removes all ACLs from a file and replaces them with a trivial ACL based on the mode argument. After replacing the ACL, the owner and group of the file are set to the values specified by the uid and gid arguments.
Upon successful completion, acl_strip() returns 0. Otherwise it returns -1 and sets errno to indicate the error.
The acl_strip() function will fail if:
EACCES
EFAULT
EINVAL
EIO
ELOOP
ENAMETOOLONG
ENOENT
ENOTDIR
EPERM
EROFS
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Evolving |
MT-Level | MT-Safe |
October 6, 2005 | OmniOS |