Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

aclfrommode(3sec) [opensolaris man page]

acltomode(3SEC) 				       File Access Control Library Functions					   acltomode(3SEC)

NAME
acltomode, aclfrommode - convert an ACL to or from permission bits SYNOPSIS
cc [ flag... ] file... -lsec [ library... ] #include <sys/types.h> #include <sys/acl.h> int acltomode(aclent_t *aclbufp, int nentries, mode_t *modep); int aclfrommode(aclent_t *aclbufp, int nentries, mode_t *modep); DESCRIPTION
The acltomode() function converts an ACL pointed to by aclbufp into the permission bits buffer pointed to by modep. If the USER_OBJ ACL entry, GROUP_OBJ ACL entry, or the OTHER_OBJ ACL entry cannot be found in the ACL buffer, then the function fails with errno set to EIN- VAL. The USER_OBJ ACL entry permission bits are copied to the file owner class bits in the permission bits buffer. The OTHER_OBJ ACL entry per- mission bits are copied to the file other class bits in the permission bits buffer. If there is a CLASS_OBJ (ACL mask) entry, the CLASS_OBJ ACL entry permission bits are copied to the file group class bits in the permission bits buffer. Otherwise, the GROUP_OBJ ACL entry permis- sion bits are copied to the file group class bits in the permission bits buffer. The aclfrommode() function converts the permission bits pointed to by modep into an ACL pointed to by aclbufp. If the USER_OBJ ACL entry, GROUP_OBJ ACL entry, or the OTHER_OBJ ACL entry cannot be found in the ACL buffer, the function fails with errno set to EINVAL. The file owner class bits from the permission bits buffer are copied to the USER_OBJ ACL entry. The file other class bits from the permis- sion bits buffer are copied to the OTHER_OBJ ACL entry. If there is a CLASS_OBJ (ACL mask) entry, the file group class bits from the per- mission bits buffer are copied to the CLASS_OBJ ACL entry, and the GROUP_OBJ ACL entry is not modified. Otherwise, the file group class bits from the permission bits buffer are copied to the GROUP_OBJ ACL entry. The nentries argument represents the number of ACL entries in the buffer pointed to by aclbufp. RETURN VALUES
Upon successful completion, the function returns 0. Otherwise, it returns -1 and sets errno to indicate the error. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
acl(2), attributes(5) SunOS 5.11 10 Dec 2001 acltomode(3SEC)

Check Out this Related Man Page

aclsort(3SEC)					       File Access Control Library Functions					     aclsort(3SEC)

NAME
aclsort - sort an ACL SYNOPSIS
cc [ flag ... ] file ... -lsec [ library ... ] #include <sys/acl.h> int aclsort(int nentries, int calclass, aclent_t *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 CLASS_OBJ (ACL mask) permissions should be recalculated. The union of the permission bits associated with all ACL entries in the buffer other than CLASS_OBJ, OTHER_OBJ, and USER_OBJ is calculated. The result is copied to the permission bits associated with the CLASS_OBJ entry. The aclsort() function sorts the contents of the ACL buffer as follows: o Entries will be in the order USER_OBJ, USER, GROUP_OBJ, GROUP, CLASS_OBJ (ACL mask), OTHER_OBJ, DEF_USER_OBJ, DEF_USER, DEF_GROUP_OBJ, DEF_GROUP, DEF_CLASS_OBJ (default ACL mask), and DEF_OTHER_OBJ. o Entries of type USER, GROUP, DEF_USER, and DEF_GROUP 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 USER_OBJ, GROUP_OBJ, CLASS_OBJ (ACL mask), and OTHER_OBJ. o There is exactly one entry each of type DEF_USER_OBJ, DEF_GROUP_OBJ, DEF_CLASS_OBJ (default ACL mask), and DEF_OTHER_OBJ if there are any default entries. o Entries of type USER, GROUP, DEF_USER, or DEF_GROUP may not contain duplicate entries. A duplicate entry is one of the same type containing the same numeric ID. RETURN VALUES
Upon successful completion, the function returns 0. Otherwise, it returns -1. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
acl(2), aclcheck(3SEC), attributes(5) SunOS 5.11 10 Dec 2001 aclsort(3SEC)
Man Page