Convert an access control list (ACL) into text
#include <sys/acl.h> char *acl_to_text( acl_t acl, ssize_t *len_p );
- A pointer to the ACL that you want to convert into text.
- NULL, or a pointer to a location where the function can store the length of the string (not including the terminating null character).
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The acl_to_text() function converts an access control list into the long text form:
The tag_type is user, group, other, or mask, the qualifier is the name or numeric ID of a user or group, and the permissions are in the form rwx, with a hyphen (-) replacing any permissions that aren't granted.
When you're finished with the text form of the ACL, you should call acl_free() to release it.
A pointer to the text form of the ACL, or NULL if an error occurred ( errno is set).
- The acl argument doesn't point to a valid ACL, or the ACL contains some improperly formed entries or otherwise can't be converted.
- There wasn't enough memory available to allocate for the string.
This function is based on the withdrawn POSIX draft P1003.1e.
Last modified: 2013-12-23