Validate an access control list (ACL)
#include <sys/acl.h> int acl_valid( acl_t acl );
- A pointer to the ACL that you want to check.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The acl_valid() function checks an access control list to make sure it's valid:
- The ACL must have one each of the ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER entries.
- If the ACL has any ACL_USER (named user) or ACL_GROUP (named group) entries, there must be one ACL_MASK entry.
- There must not be more than one entry for the same named user or group.
0, or -1 if an error occurred (errno is set).
- The acl argument doesn't point to a valid ACL, the ACL is missing some of the required entries, or there are entries that aren't unique.
- The ACL type isn't ACL_TYPE_ACCESS or ACL_TYPE_DEFAULT.
This function is based on the withdrawn POSIX draft P1003.1e.
Last modified: 2013-09-30