acl_create_entry() — Add a new extended ACL entry to the ACL

Standards

Standards / Extensions C or C++ Dependencies

z/OS UNIX

both z/OS V1R3

Format

#define _OPEN_SYS	1
#include <sys/acl.h>

int acl_create_entry(lacl_t *acl_p, acl_entry_t entry_p, int version);

General description

Use access control lists (ACLs) in conjunction with permission bits to control access to files and directories. Currently, ACLs are supported by the HFS, TFS, and zFS file systems. You must know whether your security product supports ACLs and what rules are used when determining file access. See z/OS UNIX System Services Planning for details.

The acl_create_entry() function creates a new extended ACL entry in the ACL pointed to by the contents of the pointer argument acl_p. The contents of the acl_entry are specified by entry_p. ACL working storage is allocated as needed. The first call to acl_get_entry() following the call to acl_create_entry() will obtain the first extended ACL entry in the ACL, as ordered by the system.

The version tells the function the version of ACL entry. See sys/acl.h for ACL entry mapping.

Returned value

Upon successful completion, the function returns a value of zero.

If any of the following conditions occur, the acl_create_entry() function returns -1 and sets errno to the corresponding value:

Error Code
Description
EINVAL
Argument acl_p does not point to a pointer to an ACL structure. Argument entry_d does not point to a valid extended ACL entry.
ENOMEM
The ACL working storage requires more memory than is available.

Related information