ACLTOTEXT(3SEC) | File Access Control Library Functions | ACLTOTEXT(3SEC) |
acltotext, aclfromtext - convert internal representation to or from external representation
cc [ flag... ] file... -lsec [ library... ] #include <sys/acl.h> char *acltotext(aclent_t *aclbufp, int aclcnt);
aclent_t *aclfromtext(char *acltextp, int *aclcnt);
The acltotext() function converts an internal ACL representation pointed to by aclbufp into an external ACL representation. The space for the external text string is obtained using malloc(3C). The caller is responsible for freeing the space upon completion.
The aclfromtext() function converts an external ACL representation pointed to by acltextp into an internal ACL representation. The space for the list of ACL entries is obtained using malloc(3C). The caller is responsible for freeing the space upon completion. The aclcnt argument indicates the number of ACL entries found.
An external ACL representation is defined as follows:
<acl_entry>[,<acl_entry>]...
Each <acl_entry> contains one ACL entry. The external representation of an ACL entry contains two or three colon-separated fields. The first field contains the ACL entry tag type. The entry type keywords are defined as:
user
group
other
mask
default:user
default:group
default:other
default:mask
The second field contains the ACL entry ID, as follows:
uid
gid
empty
The third field contains the following symbolic discretionary access permissions:
r
w
x
−
Upon successful completion, the acltotext() function returns a pointer to a text string. Otherwise, it returns NULL.
Upon successful completion, the aclfromtext() function returns a pointer to a list of ACL entries. Otherwise, it returns NULL.
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Evolving |
MT-Level | Unsafe |
December 10, 2001 | OmniOS |