1aclsort(3SEC)        File Access Control Library Functions       aclsort(3SEC)
2
3
4

NAME

6       aclsort - sort an ACL
7

SYNOPSIS

9       cc [ flag ... ] file ... -lsec [ library ... ]
10       #include <sys/acl.h>
11
12       int aclsort(int nentries, int calclass, aclent_t *aclbufp);
13
14

DESCRIPTION

16       The  aclbufp  argument  points  to a buffer containing ACL entries. The
17       nentries argument specifies the number of ACL entries  in  the  buffer.
18       The  calclass  argument, if non-zero, indicates that the CLASS_OBJ (ACL
19       mask) permissions should be recalculated. The union of  the  permission
20       bits  associated  with  all  ACL  entries  in  the  buffer  other  than
21       CLASS_OBJ, OTHER_OBJ, and USER_OBJ is calculated. The result is  copied
22       to the permission bits associated with the CLASS_OBJ entry.
23
24
25       The aclsort() function sorts the contents of the ACL buffer as follows:
26
27           o      Entries  will  be  in  the  order USER_OBJ, USER, GROUP_OBJ,
28                  GROUP,  CLASS_OBJ  (ACL  mask),   OTHER_OBJ,   DEF_USER_OBJ,
29                  DEF_USER,  DEF_GROUP_OBJ,  DEF_GROUP, DEF_CLASS_OBJ (default
30                  ACL mask), and DEF_OTHER_OBJ.
31
32           o      Entries of type USER, GROUP, DEF_USER, and DEF_GROUP will be
33                  sorted in increasing order by ID.
34
35
36       The aclsort() function will succeed if all of the following are true:
37
38           o      There is exactly one entry each of type USER_OBJ, GROUP_OBJ,
39                  CLASS_OBJ (ACL mask), and OTHER_OBJ.
40
41           o      There is  exactly  one  entry  each  of  type  DEF_USER_OBJ,
42                  DEF_GROUP_OBJ,   DEF_CLASS_OBJ   (default   ACL  mask),  and
43                  DEF_OTHER_OBJ if there are any default entries.
44
45           o      Entries of type USER, GROUP, DEF_USER, or DEF_GROUP may  not
46                  contain  duplicate  entries. A duplicate entry is one of the
47                  same type containing the same numeric ID.
48

RETURN VALUES

50       Upon successful completion,  the  function  returns  0.  Otherwise,  it
51       returns −1.
52

ATTRIBUTES

54       See attributes(5) for descriptions of the following attributes:
55
56
57
58
59       ┌─────────────────────────────┬─────────────────────────────┐
60       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
61       ├─────────────────────────────┼─────────────────────────────┤
62       │Interface Stability          │Evolving                     │
63       ├─────────────────────────────┼─────────────────────────────┤
64       │MT-Level                     │Unsafe                       │
65       └─────────────────────────────┴─────────────────────────────┘
66

SEE ALSO

68       acl(2), aclcheck(3SEC), attributes(5)
69
70
71
72SunOS 5.11                        10 Dec 2001                    aclsort(3SEC)
Impressum