File Access Control Library Functions aclsort(3SEC)
NAME
aclsort - sort an ACL
SYNOPSIS
cc [ flag ... ] file ... -lsec [ library ... ]
#include
int aclsort(int nentries, int calclass, aclentt *aclbufp);
DESCRIPTION
The aclbufp argument points to a buffer containing ACL
entries. The nentries argument specifies the number of ACL
entries in the buffer. The calclass argument, if non-zero,
indicates that the CLASOBJ (ACL mask) permissions should
be recalculated. The union of the permission bits associated
with all ACL entries in the buffer other than CLASOBJ,
OTHEROBJ, and USEROBJ is calculated. The result is copied
to the permission bits associated with the CLASOBJ entry.
The aclsort() function sorts the contents of the ACL buffer
as follows:
o Entries will be in the order USEROBJ, USER,
GROUPOBJ, GROUP, CLASOBJ (ACL mask), OTHEROBJ,
DEFUSEROBJ, DEFUSER, DEFGROUPOBJ, DEFGROUP,
DEFCLASOBJ (default ACL mask), and
DEFOTHEROBJ.
o Entries of type USER, GROUP, DEFUSER, and
DEFGROUP will be sorted in increasing order by ID.
The aclsort() function will succeed if all of the following
are true:
o There is exactly one entry each of type USEROBJ,
GROUPOBJ, CLASOBJ (ACL mask), and OTHEROBJ.
o There is exactly one entry each of type
DEFUSEROBJ, DEFGROUPOBJ, DEFCLASOBJ (default
ACL mask), and DEFOTHEROBJ if there are any
default entries.
o Entries of type USER, GROUP, DEFUSER, or DEFGROUP
may not contain duplicate entries. A duplicate
entry is one of the same type containing the same
numeric ID.
RETURN VALUES
SunOS 5.11 Last change: 10 Dec 2001 1
File Access Control Library Functions aclsort(3SEC)
Upon successful completion, the function returns 0. Other-
wise, it returns -1.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Evolving
MT-Level Unsafe
SEE ALSO
acl(2), aclcheck(3SEC), attributes(5)
SunOS 5.11 Last change: 10 Dec 2001 2
|