2 .\" Copyright (c) 2001, Sun Microsystems, Inc.
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 .\" 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 .\" 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 .TH ACLSORT 3SEC "Dec 10, 2001"
12 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsec\fR [ \fIlibrary\fR ... ]
15 \fBint\fR \fBaclsort\fR(\fBint\fR \fInentries\fR, \fBint\fR \fIcalclass\fR, \fBaclent_t *\fR\fIaclbufp\fR);
21 The \fIaclbufp\fR argument points to a buffer containing \fBACL\fR entries. The
22 \fInentries\fR argument specifies the number of \fBACL\fR entries in the
23 buffer. The \fIcalclass\fR argument, if non-zero, indicates that the
24 \fBCLASS_OBJ\fR (\fBACL\fR mask) permissions should be recalculated. The union
25 of the permission bits associated with all \fBACL\fR entries in the buffer
26 other than \fBCLASS_OBJ\fR, \fBOTHER_OBJ\fR, and \fBUSER_OBJ\fR is calculated.
27 The result is copied to the permission bits associated with the \fBCLASS_OBJ\fR
31 The \fBaclsort()\fR function sorts the contents of the \fBACL\fR buffer as
37 Entries will be in the order \fBUSER_OBJ\fR, \fBUSER\fR, \fBGROUP_OBJ\fR,
38 \fBGROUP\fR, \fBCLASS_OBJ\fR (\fBACL\fR mask), \fBOTHER_OBJ\fR,
39 \fBDEF_USER_OBJ\fR, \fBDEF_USER\fR, \fBDEF_GROUP_OBJ\fR, \fBDEF_GROUP\fR,
40 \fBDEF_CLASS_OBJ\fR (default \fBACL\fR mask), and \fBDEF_OTHER_OBJ\fR.
46 Entries of type \fBUSER\fR, \fBGROUP\fR, \fBDEF_USER\fR, and \fBDEF_GROUP\fR
47 will be sorted in increasing order by \fBID\fR.
51 The \fBaclsort()\fR function will succeed if all of the following are true:
56 There is exactly one entry each of type \fBUSER_OBJ\fR, \fBGROUP_OBJ\fR,
57 \fBCLASS_OBJ\fR (\fBACL\fR mask), and \fBOTHER_OBJ\fR.
63 There is exactly one entry each of type \fBDEF_USER_OBJ\fR,
64 \fBDEF_GROUP_OBJ\fR, \fBDEF_CLASS_OBJ\fR (default \fBACL\fR mask), and
65 \fBDEF_OTHER_OBJ\fR if there are any default entries.
71 Entries of type \fBUSER\fR, \fBGROUP\fR, \fBDEF_USER\fR, or \fBDEF_GROUP\fR may
72 not contain duplicate entries. A duplicate entry is one of the same type
73 containing the same numeric \fBID\fR.
78 Upon successful completion, the function returns \fB0\fR. Otherwise, it returns
83 See \fBattributes\fR(5) for descriptions of the following attributes:
91 ATTRIBUTE TYPE ATTRIBUTE VALUE
93 Interface Stability Evolving
101 \fBacl\fR(2), \fBaclcheck\fR(3SEC), \fBattributes\fR(5)