1ACL_ADD_PERM(3)          BSD Library Functions Manual          ACL_ADD_PERM(3)
2

NAME

4     acl_add_perm — add a permission to an ACL permission set
5

LIBRARY

7     Linux Access Control Lists library (libacl, -lacl).
8

SYNOPSIS

10     #include <sys/types.h>
11     #include <sys/acl.h>
12
13     int
14     acl_add_perm(acl_permset_t permset_d, acl_perm_t perm);
15

DESCRIPTION

17     The acl_add_perm() function adds the permission contained in the argument
18     perm (one of ACL_READ, ACL_WRITE, ACL_EXECUTE) to the permission set re‐
19     ferred to by the argument permset_d.  An attempt to add a permission that
20     is already contained in the permission set is not considered an error.
21
22     Any existing descriptors that refer to permset_d continue to refer to
23     that permission set.
24

RETURN VALUE

26     The acl_add_perm() function returns the value 0 if successful; otherwise
27     the value -1 is returned and the global variable errno is set to indicate
28     the error.
29

ERRORS

31     If any of the following conditions occur, the acl_add_perm() function re‐
32     turns -1 and sets errno to the corresponding value:
33
34     [EINVAL]           The argument permset_d is not a valid descriptor for a
35                        permission set within an ACL entry.
36
37                        The argument perm does not contain a valid acl_perm_t
38                        value.
39

STANDARDS

41     IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned)
42

SEE ALSO

44     acl_clear_perms(3), acl_delete_perm(3), acl_get_perm(3),
45     acl_get_permset(3), acl_set_permset(3), acl(5)
46

AUTHOR

48     Derived from the FreeBSD manual pages written by Robert N M Watson
49     <rwatson@FreeBSD.org>, and adapted for Linux by Andreas Gruenbacher
50     <andreas.gruenbacher@gmail.com>.
51
52Linux ACL                       March 23, 2002                       Linux ACL
Impressum