1ACL_VALID(3) BSD Library Functions Manual ACL_VALID(3)
2
4 acl_valid — validate an ACL
5
7 Linux Access Control Lists library (libacl, -lacl).
8
10 #include <sys/types.h>
11 #include <sys/acl.h>
12
13 int
14 acl_valid(acl_t acl);
15
17 The acl_valid() function checks the ACL referred to by the argument acl
18 for validity.
19
20 The three required entries ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER
21 must exist exactly once in the ACL. If the ACL contains any ACL_USER or
22 ACL_GROUP entries, then an ACL_MASK entry is also required. The ACL may
23 contain at most one ACL_MASK entry.
24
25 The user identifiers must be unique among all entries of type ACL_USER.
26 The group identifiers must be unique among all entries of type ACL_GROUP.
27
29 The acl_valid() function returns the value 0 if successful; otherwise the
30 value -1 is returned and the global variable errno is set to indicate the
31 error.
32
34 If any of the following conditions occur, the acl_valid() function re‐
35 turns -1 and sets errno to the corresponding value:
36
37 [EINVAL] The argument acl is not a valid pointer to an ACL.
38
39 The argument acl does not point to a valid ACL.
40
41 One or more of the required ACL entries is not present
42 in acl.
43
44 The ACL contains entries that are not unique.
45
47 IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned)
48
50 acl_check(3), acl_set_file(3), acl(5)
51
53 Derived from the FreeBSD manual pages written by Robert N M Watson
54 <rwatson@FreeBSD.org>, and adapted for Linux by Andreas Gruenbacher
55 <andreas.gruenbacher@gmail.com>.
56
57Linux ACL March 23, 2002 Linux ACL