Print this page
12288 getfacl and setfacl could stand improvement
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3sec/acltotext.3sec
+++ new/usr/src/man/man3sec/acltotext.3sec
1 1 '\" te
2 2 .\" Copyright (c) 2001, Sun Microsystems, Inc.
3 3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 6 .TH ACLTOTEXT 3SEC "Dec 10, 2001"
7 7 .SH NAME
8 8 acltotext, aclfromtext \- convert internal representation to or from external
9 9 representation
10 10 .SH SYNOPSIS
11 -.LP
12 11 .nf
13 12 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lsec\fR [ \fIlibrary\fR... ]
14 13 #include <sys/acl.h>
15 14
16 15 \fBchar *\fR\fBacltotext\fR(\fBaclent_t *\fR\fIaclbufp\fR, \fBint\fR \fIaclcnt\fR);
17 16 .fi
18 17
19 18 .LP
20 19 .nf
21 20 \fBaclent_t *\fR\fBaclfromtext\fR(\fBchar *\fR\fIacltextp\fR, \fBint *\fR\fIaclcnt\fR);
22 21 .fi
23 22
24 23 .SH DESCRIPTION
25 -.sp
26 -.LP
27 24 The \fBacltotext()\fR function converts an internal \fBACL\fR representation
28 25 pointed to by \fIaclbufp\fR into an external \fBACL\fR representation. The
29 26 space for the external text string is obtained using \fBmalloc\fR(3C). The
30 -caller is responsible for freeing the space upon completion..
27 +caller is responsible for freeing the space upon completion.
31 28 .sp
32 29 .LP
33 30 The \fBaclfromtext()\fR function converts an external \fBACL\fR representation
34 31 pointed to by \fIacltextp\fR into an internal \fBACL\fR representation. The
35 32 space for the list of \fBACL\fR entries is obtained using \fBmalloc\fR(3C). The
36 33 caller is responsible for freeing the space upon completion. The \fIaclcnt\fR
37 34 argument indicates the number of \fBACL\fR entries found.
38 35 .sp
39 36 .LP
40 37 An external \fBACL\fR representation is defined as follows:
41 38 .sp
42 39 .LP
43 40 <acl_entry>[,<acl_entry>]\|.\|.\|.
44 41 .sp
45 42 .LP
46 43 Each <acl_entry> contains one \fBACL\fR entry. The external representation of
47 44 an \fBACL\fR entry contains two or three colon-separated fields. The first
48 45 field contains the \fBACL\fR entry tag type. The entry type keywords are
49 46 defined as:
50 47 .sp
51 48 .ne 2
52 49 .na
53 50 \fB\fBuser\fR\fR
54 51 .ad
55 52 .RS 17n
56 53 This \fBACL\fR entry with no \fBUID\fR specified in the \fBACL\fR entry
57 54 \fBID\fR field specifies the access granted to the owner of the object.
58 55 Otherwise, this \fBACL\fR entry specifies the access granted to a specific
59 56 user-name or user-id number.
60 57 .RE
61 58
62 59 .sp
63 60 .ne 2
64 61 .na
65 62 \fB\fBgroup\fR\fR
66 63 .ad
67 64 .RS 17n
68 65 This \fBACL\fR entry with no \fBGID\fR specified in the \fBACL\fR entry
69 66 \fBID\fR field specifies the access granted to the owning group of the object.
70 67 Otherwise, this \fBACL\fR entry specifies the access granted to a specific
71 68 group-name or group-id number.
72 69 .RE
73 70
74 71 .sp
75 72 .ne 2
76 73 .na
77 74 \fB\fBother\fR\fR
78 75 .ad
79 76 .RS 17n
80 77 This \fBACL\fR entry specifies the access granted to any user or group that
81 78 does not match any other \fBACL\fR entry.
82 79 .RE
83 80
84 81 .sp
85 82 .ne 2
86 83 .na
87 84 \fB\fBmask\fR\fR
88 85 .ad
89 86 .RS 17n
90 87 This \fBACL\fR entry specifies the maximum access granted to user or group
91 88 entries.
92 89 .RE
93 90
94 91 .sp
95 92 .ne 2
96 93 .na
97 94 \fB\fBdefault:user\fR\fR
98 95 .ad
99 96 .RS 17n
100 97 This \fBACL\fR entry with no uid specified in the \fBACL\fR entry \fBID\fR
101 98 field specifies the default access granted to the owner of the object.
102 99 Otherwise, this \fBACL\fR entry specifies the default access granted to a
103 100 specific user-name or user-\fBID\fR number.
104 101 .RE
105 102
106 103 .sp
107 104 .ne 2
108 105 .na
109 106 \fB\fBdefault:group\fR\fR
110 107 .ad
111 108 .RS 17n
112 109 This \fBACL\fR entry with no gid specified in the \fBACL\fR entry \fBID\fR
113 110 field specifies the default access granted to the owning group of the object.
114 111 Otherwise, this \fBACL\fR entry specifies the default access granted to a
115 112 specific group-name or group-\fBID\fR number.
116 113 .RE
117 114
118 115 .sp
119 116 .ne 2
120 117 .na
121 118 \fB\fBdefault:other\fR\fR
122 119 .ad
123 120 .RS 17n
124 121 This \fBACL\fR entry specifies the default access for other entry.
125 122 .RE
126 123
127 124 .sp
128 125 .ne 2
129 126 .na
130 127 \fB\fBdefault:mask\fR\fR
131 128 .ad
132 129 .RS 17n
133 130 This \fBACL\fR entry specifies the default access for mask entry.
134 131 .RE
135 132
136 133 .sp
137 134 .LP
138 135 The second field contains the \fBACL\fR entry \fBID\fR, as follows:
139 136 .sp
140 137 .ne 2
141 138 .na
142 139 \fB\fBuid\fR\fR
143 140 .ad
144 141 .RS 9n
145 142 This field specifies a user-name, or user-\fBID\fR if there is no user-name
146 143 associated with the user-\fBID\fR number.
147 144 .RE
148 145
149 146 .sp
150 147 .ne 2
151 148 .na
152 149 \fB\fBgid\fR\fR
153 150 .ad
154 151 .RS 9n
155 152 This field specifies a group-name, or group-\fBID\fR if there is no group-name
156 153 associated with the group-\fBID\fR number.
157 154 .RE
158 155
159 156 .sp
160 157 .ne 2
161 158 .na
162 159 \fB\fBempty\fR\fR
163 160 .ad
164 161 .RS 9n
165 162 This field is used by the user and group \fBACL\fR entry types.
166 163 .RE
167 164
168 165 .sp
169 166 .LP
170 167 The third field contains the following symbolic discretionary access
171 168 permissions:
172 169 .sp
173 170 .ne 2
174 171 .na
175 172 \fB\fBr\fR\fR
176 173 .ad
177 174 .RS 9n
178 175 read permission
179 176 .RE
180 177
181 178 .sp
182 179 .ne 2
183 180 .na
184 181 \fB\fBw\fR\fR
185 182 .ad
186 183 .RS 9n
187 184 write permission
188 185 .RE
189 186
190 187 .sp
191 188 .ne 2
192 189 .na
193 190 \fB\fBx\fR\fR
194 191 .ad
195 192 .RS 9n
196 193 execute/search permission
197 194 .RE
198 195
↓ open down ↓ |
158 lines elided |
↑ open up ↑ |
199 196 .sp
200 197 .ne 2
201 198 .na
202 199 \fB\fB\(mi\fR \fR
203 200 .ad
204 201 .RS 9n
205 202 no access
206 203 .RE
207 204
208 205 .SH RETURN VALUES
209 -.sp
210 -.LP
211 206 Upon successful completion, the \fBacltotext()\fR function returns a pointer to
212 207 a text string. Otherwise, it returns \fBNULL\fR.
213 208 .sp
214 209 .LP
215 210 Upon successful completion, the \fBaclfromtext()\fR function returns a pointer
216 211 to a list of \fBACL\fR entries. Otherwise, it returns \fBNULL\fR.
217 212 .SH ATTRIBUTES
218 -.sp
219 -.LP
220 213 See \fBattributes\fR(5) for descriptions of the following attributes:
221 214 .sp
222 215
223 216 .sp
224 217 .TS
225 218 box;
226 219 c | c
227 220 l | l .
228 221 ATTRIBUTE TYPE ATTRIBUTE VALUE
229 222 _
230 223 Interface Stability Evolving
231 224 _
232 225 MT-Level Unsafe
233 226 .TE
234 227
235 228 .SH SEE ALSO
236 -.sp
237 -.LP
238 229 \fBacl\fR(2), \fBmalloc\fR(3C), \fBattributes\fR(5)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX