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
19     referred to by the argument permset_d.  An attempt to add a permission
20     that is already contained in the permission set is not considered an
21     error.
22
23     Any existing descriptors that refer to permset_d continue to refer to
24     that permission set.
25

RETURN VALUE

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

ERRORS

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

STANDARDS

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

SEE ALSO

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

AUTHOR

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