Print this page
12288 getfacl and setfacl could stand improvement
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3sec/aclcheck.3sec.man.txt
+++ new/usr/src/man/man3sec/aclcheck.3sec.man.txt
1 1 ACLCHECK(3SEC) File Access Control Library Functions ACLCHECK(3SEC)
2 2
3 3
4 4
5 5 NAME
6 6 aclcheck - check the validity of an ACL
7 7
8 8 SYNOPSIS
9 9 cc [ flag... ] file... -lsec [ library... ]
10 10 #include <sys/acl.h>
11 11
12 12 int aclcheck(aclent_t *aclbufp, int nentries, int *which);
13 13
14 14
15 15 DESCRIPTION
16 16 The aclcheck() function checks the validity of an ACL pointed to by
17 17 aclbufp. The nentries argument is the number of entries contained in
18 18 the buffer. The which parameter returns the index of the first entry
19 19 that is invalid.
20 20
21 21
22 22 The function verifies that an ACL pointed to by aclbufp is valid
23 23 according to the following rules:
24 24
25 25 o There must be exactly one GROUP_OBJ ACL entry.
26 26
27 27 o There must be exactly one USER_OBJ ACL entry.
28 28
29 29 o There must be exactly one OTHER_OBJ ACL entry.
30 30
31 31 o If there are any GROUP ACL entries, then the group ID in
32 32 each group ACL entry must be unique.
33 33
34 34 o If there are any USER ACL entries, then the user ID in each
35 35 user ACL entry must be unique.
36 36
37 37 o If there are any GROUP or USER ACL entries, then there must
38 38 be exactly one CLASS_OBJ (ACL mask) entry.
39 39
40 40 o If there are any default ACL entries, then the following
41 41 apply:
42 42
43 43 o There must be exactly one default GROUP_OBJ ACL entry.
44 44
45 45 o There must be exactly one default OTHER_OBJ ACL entry.
46 46
47 47 o There must be exactly one default USER_OBJ ACL entry.
48 48
49 49 o If there are any DEF_GROUP entries, then the group ID in
↓ open down ↓ |
49 lines elided |
↑ open up ↑ |
50 50 each DEF_GROUP ACL entry must be unique.
51 51
52 52 o If there are any DEF_USER entries, then the user ID in
53 53 each DEF_USER ACL entry must be unique.
54 54
55 55 o If there are any DEF_GROUP or DEF_USER entries, then
56 56 there must be exactly one DEF_CLASS_OBJ (default ACL
57 57 mask) entry.
58 58
59 59 o If any of the above rules are violated, then the function
60 - fails with errno set to EINVAL.
60 + fails with errno set to EINVAL.
61 61
62 62 RETURN VALUES
63 - If the ACL is valid, alcheck() will return 0. Otherwise errno is set to
64 - EINVAL and return code is set to one of the following:
63 + If the ACL is valid, aclcheck() will return 0. Otherwise errno is set
64 + to EINVAL and aclcheck() will return one of the following:
65 65
66 66 GRP_ERROR
67 67 There is more than one GROUP_OBJ or DEF_GROUP_OBJ
68 68 ACL entry.
69 69
70 70
71 71 USER_ERROR
72 72 There is more than one USER_OBJ or DEF_USER_OBJ ACL
73 73 entry.
74 74
75 75
76 76 CLASS_ERROR
77 77 There is more than one CLASS_OBJ (ACL mask) or
78 78 DEF_CLASS_OBJ (default ACL mask) entry.
79 79
80 80
81 81 OTHER_ERROR
82 82 There is more than one OTHER_OBJ or DEF_OTHER_OBJ
83 83 ACL entry.
84 84
85 85
86 86 DUPLICATE_ERROR
87 87 Duplicate entries of USER, GROUP, DEF_USER, or
88 88 DEF_GROUP.
89 89
90 90
91 91 ENTRY_ERROR
92 92 The entry type is invalid.
93 93
94 94
95 95 MISS_ERROR
96 96 Missing an entry. The which parameter returns -1 in
97 97 this case.
98 98
99 99
100 100 MEM_ERROR
101 101 The system cannot allocate any memory. The which
102 102 parameter returns -1 in this case.
103 103
104 104
105 105 ATTRIBUTES
106 106 See attributes(5) for descriptions of the following attributes:
107 107
108 108
109 109
110 110
111 111 +--------------------+-----------------+
112 112 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
113 113 +--------------------+-----------------+
114 114 |Interface Stability | Evolving |
115 115 +--------------------+-----------------+
116 116 |MT-Level | Unsafe |
117 117 +--------------------+-----------------+
118 118
119 119 SEE ALSO
120 120 acl(2), aclsort(3SEC), attributes(5)
121 121
122 122
123 123
124 124 December 10, 2001 ACLCHECK(3SEC)
↓ open down ↓ |
50 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX