1acl_check(3SEC) File Access Control Library Functions acl_check(3SEC)
2
3
4
6 acl_check - check the validity of an ACL
7
9 cc [ flag... ] file... -lsec [ library... ]
10 #include <sys/acl.h>
11
12 int acl_check(acl_t *aclp, int isdir);
13
14
16 The acl_check() function checks the validity of an ACL pointed to by
17 aclp. The isdir argument checks the validity of an ACL that will be
18 applied to a directory. The ACL can be either a POSIX draft ACL as sup‐
19 ported by UFS or NFSv4 ACL as supported by ZFS or NFSV4.
20
21
22 When the function verifies a POSIX draft ACL, the rules followed are
23 described in aclcheck(3SEC). For NFSv4 ACL, the ACL is verified against
24 the following rules:
25
26 o The inheritance flags are valid.
27
28 o The ACL must have at least one ACL entry and no more than
29 {MAX_ACL_ENTRIES}.
30
31 o The permission field contains only supported permissions.
32
33 o The entry type is valid.
34
35 o The flag fields contain only valid flags as supported by
36 NFSv4/ZFS.
37
38
39 If any of the above rules are violated, the function fails with errno
40 set to EINVAL.
41
43 If the ACL is valid, acl_check() returns 0. Otherwise errno is set to
44 EINVAL and the return value is set to one of the following:
45
46 EACL_INHERIT_ERROR There are invalid inheritance flags specified.
47
48
49 EACL_FLAGS_ERROR There are invalid flags specified on the ACL
50 that don't map to supported flags in NFSV4/ZFS
51 ACL model.
52
53
54 EACL_ENTRY_ERROR The ACL contains an unknown value in the type
55 field.
56
57
58 EACL_MEM_ERROR The system cannot allocate any memory.
59
60
61 EACL_INHERIT_NOTDIR Inheritance flags are only allowed for ACLs on
62 directories.
63
64
66 See attributes(5) for descriptions of the following attributes:
67
68
69
70
71 ┌─────────────────────────────┬─────────────────────────────┐
72 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
73 ├─────────────────────────────┼─────────────────────────────┤
74 │Interface Stability │Committed │
75 ├─────────────────────────────┼─────────────────────────────┤
76 │MT-Level │MT-Safe │
77 └─────────────────────────────┴─────────────────────────────┘
78
80 acl(2), aclcheck(3SEC), aclsort(3SEC), acl(5), attributes(5)
81
82
83
84SunOS 5.11 22 Apr 2008 acl_check(3SEC)