Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
Miscellaneous acl(5)
configuration. NFS client attempts to write to a read-only OSS fileset are reported
immediately to the NFS client application.
• If an OSS fileset has objects protected by optional OSS ACL entries, if you mount that
fileset from NFS client systems as read-write, you must use mount options that disable
write buffering. Because of the behavior of some NFS V2 clients, if you do not disable
write buffering, the server might not receive the correct user ID information from the
NFS client, which can result in write requests being denied or data being written to a file
by a client that should have been denied write access. See the description of the OSS
fileset NFSPERMMAP attribute in the Open System Services NFS Management and
Operations Guide
• Changing the NFSPERMMAP attribute on an OSS fileset in which NFS clients currently
have open files can confuse some NFS client software. See the discussion about chang-
ing the operating parameters of a fileset in the Open System Services Management and
Operations Guide.
HEADERS
sys/acl.h
The sys/acl.h header file defines the following constants to govern the number of entries per
ACL:
NACLENTRIES
The maximum number of entries per ACL, including base entries
NACLBASE The number of base entries
For compatibility with HP-UX, the variable name NACLVENTRIES is provided as an
alias for NACLENTRIES.
The ACL structure struct acl is also defined and includes these fields:
int a_type; /* type of entry */
uid_t a_id; /* group ID */
unsigned short a_perm; /* see <unistd.h> */
The sys/acl.h header defines the set of valid values for the a_type field in addition to the
valid values for the cmd parameter of the acl() function.
EXAMPLE PROGRAM
This program provides simple examples of acl(2) and aclsort(3) usage.
/* This program provides simple examples of acl(2) and aclsort(3) usage.
* It adds a GROUP ACL entry (with read permissions) to the ACL of the
* file. The file pathname and group ID number are passed as command
* arguments.
* To run:
* addACLgroup <pathname> <group ID number>
* This program performs the following steps:
* 1. Acquires the count of ACL entries in the ACL on the file
* using acl(ACL_CNT).
* 2. Allocates memory for the ACL buffer using malloc().
* 3. Acquires the existing ACL on the file using acl(ACL_GET).
* 4. Adds a new GROUP ACL entry to the end of the ACL buffer.
* 5. Calls aclsort() to sort the ACL entries in the ACL buffer
* into the proper order.
* 6. Sets the new ACL on the file using acl(ACL_SET).
527186-023 Hewlett-Packard Company 12−13