ACL_TRIVIAL(3SEC) File Access Control Library Functions ACL_TRIVIAL(3SEC)

acl_trivial - determine whether a file has a trivial ACL

cc [ flag... ] file... -lsec [ library... ]
#include <sys/acl.h>
int acl_trivial(char *path);

The acl_trivial() function is used to determine whether a file has a trivial ACL. Whether an ACL is trivial depends on the type of the ACL. A POSIX draft ACL is trivial if it does not have more than MIN_ACL_ENTRIES entries. An NFSv4/ZFS-style ACL is trivial if it does not have entries other than owner@, group@, and everyone@, does not have inheritance flags set, and is ordered in a manner that meets POSIX access control requirements.

Upon successful completion, acl_trivial() returns 0 if the file's ACL is trivial and 1 if the file's ACL is not trivial. If it could not be determined whether a file's ACL is trivial, -1 is returned and errno is set to indicate the error.

The acl_trivial() function will fail if:

EACCES

A file's ACL could not be read.

ENOENT

A component of path does not name an existing file or path is an empty string.

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Interface Stability Evolving
MT-Level MT-Safe

acl(7), attributes(7)

November 24, 2014 OmniOS