Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)
aclsort(3) Guardian Native C Library Calls Reference Manual
NAME
aclsort - Sorts an access control list (ACL)
LIBRARY
G-series native Guardian processes: system library
G-series native OSS processes: system library
SYNOPSIS
#include <sys/types.h>
#include <sys/acl.h>
int aclsort ( int nentries, int calclass, struct acl *aclbufp );
PARAMETERS
nentries Specifies the number of ACL entries in the buffer aclbufp.
calclass If nonzero, specifies that the class permissions be recalculated.
aclbufp Points to a buffer containing ACL entries.
DESCRIPTION
The aclsort function sorts ACL entry objects into the order required by the acl() function:
USER_OBJ
USER
GROUP_OBJ
GROUP
CLASS_OBJ
OTHER_OBJ
DEF_USER_OBJ
DEF_USER
DEF_GROUP_OBJ
DEF_GROUP
DEF_CLASS_OBJ
DEF_OTHER_OBJ
Entries of type USER, GROUP, DEF_USER, and DEF_GROUP are sorted in increasing order
by numeric ID.
This function succeeds if all of these conditions are true:
• The ACL contains exactly one entry each of type USER_OBJ,
GROUP_OBJ, CLASS_OBJ, and OTHER_OBJ.
• If pathp points to a directory, the ACL contains at most one entry each
of type DEF_USER_OBJ, DEF_GROUP_OBJ, DEF_CLASS_OBJ,
and DEF_OTHER_OBJ.
• Entries of type USER, GROUP, DEF_USER,orDEF_GROUP do not
contain duplicate entries. A duplicate entry is one of the same type con-
taining the same numeric ID.
• If the calclass parameter is 0 (zero) and the ACL contains no entries of
type USER and no entries of type GROUP, the entries of type
GROUP_OBJ and CLASS_OBJ have the same permissions.
1−6 Hewlett-Packard Company 527192-007