aclsort(3C)aclsort(3C)NAMEaclsort() - sort an Access Control List (JFS File Systems only)
SYNOPSISDESCRIPTION
The routine sorts JFS Access Control List (ACL) entries into the cor‐
rect order to be accepted by the acl(2) system call.
points to a buffer containing ACL entries; if non-zero, indicates that
the permissions should be recalculated; and specifies the number of ACL
entries in the buffer.
sorts the contents of the ACL buffer as follows:
Entries will be in order and
Entries of type and will be sorted in increasing order by
numeric ID.
The call will succeed if all of the following are true:
There is exactly one entry each of type and
There is at most one entry each of type and
Entries of type or may not contain duplicate entries. A dupli‐
cate entry is one of the same type containing the same numeric
id, irrespective of permission bits.
If the argument is zero and there are no entries of type and no
entries of type the permissions of the and entries must be the
same.
If there are no entries of type and no entries of type and the
entry is specified, then the entry must also be specified, and
the permissions of the and entries must be the same.
RETURN VALUE
Upon successful completion, the return value is 0. If there are dupli‐
cate entries, the return value is the position of the first duplicate
entry. If there is more than one entry of type or they are treated as
duplicate entries, and the return value is the position of the first
duplicate entry. For all other errors, the return value is -1.
NOTICES
The buffer is sorted by type and ID before checking for any failures.
Therefore the buffer is always sorted, even if there is a failure.
The position of a duplicate entry returned on failure is not the byte
offset of the duplicate entry from its base; rather it refers to the
entry number of the duplicate entry within the sorted buffer.
Checks will be performed in order of entry type. If there are multiple
failures, the failure returned will be the first encountered, for exam‐
ple, if the ACL buffer contains a duplicate entry and does not contain
an entry, the return value will be the first duplicate entry.
ACLs do not have to be sorted with prior to passing them to acl(2).
DEPENDENCIES
is supported only on JFS file systems on the standard HP-UX operating
system.
AUTHOR
was developed by AT&T.
SEE ALSOacl(2), aclv(5).
aclsort(3C)