Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (a - d) aclsort(3)
• 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.
• If the ACL contains no entries of type DEF_USER and no entries of type
DEF_GROUP, and an entry of type DEF_GROUP_OBJ is specified, an entry of type
DEF_CLASS_OBJ is also specified and the two entries have the same permissions.
NOTES
The buffer is sorted by type and ID before checking for any failures. Therefore the buffer is
always sorted, even if a failure occurs.
The position of a duplicate entry returned on failure is not the byte offset of the duplicate entry
from its base; it refers to the entry number of the duplicate entry within the sorted buffer.
Checks are performed in order of entry type. If multiple failures occur, the aclsort( ) function
returns the first errror encountered. For example, if the ACL buffer contains a duplicate USER
entry and does not contain an OTHER_OBJ entry, the aclsort( ) function returns the value of the
first duplicate USER entry.
You do not have to use aclsort( ) to sort an ACL before passing the ACL to the acl( ) function.
RETURN VALUES
On successful completion, the aclsort( ) function returns a 0 (zero).
If the ACL contains duplicate entries, the aclsort( ) function returns the position of the first dupli-
cate entry.
An ACL can contain exactly one entry of each of these types:
USER_OBJ
GROUP_OBJ
CLASS_OBJ
OTHER_OBJ
DEF_USER_OBJ
DEF_GROUP_OBJ
DEF_CLASS_OBJ
DEF_OTHER_OBJ
If the ACL contains more than one entry of each of the preceding types, the entries are treated as
duplicate entries, and the aclsort( ) function returns the position of the first duplicate entry.
For all other errors, the aclsort( ) function returns the value -1 and errno is set to indicate the
error.
ERRORS
The aclsort( ) function can fail with errno set to:
[ENOSYS] This system does not support OSS ACLs.
RELATED INFORMATION
Functions: acl(2).
Miscellaneous topcs: acl(5).
STANDARDS CONFORMANCE
This command is an HP extension to the XPG4 Version 2 specification.
527187-017 Hewlett-Packard Company 1−7