1ACL_GET_PERM(3) BSD Library Functions Manual ACL_GET_PERM(3)
2
4 acl_get_perm — test for a permission in an ACL permission set
5
7 Linux Access Control Lists library (libacl, -lacl).
8
10 #include <sys/types.h>
11 #include <acl/libacl.h>
12
13 int
14 acl_get_perm(acl_permset_t permset_d, acl_perm_t perm);
15
17 The acl_get_perm() function tests if the permission specified by the
18 argument perm (one of ACL_READ, ACL_WRITE, ACL_EXECUTE) is contained in
19 the ACL permission set pointed to by the argument permset_d.
20
21 Any existing descriptors that refer to permset_d continue to refer to
22 that permission set.
23
25 If successful, the acl_get_perm() function returns 1 if the permission
26 specified by perm is contained in the ACL permission set permset_d, and 0
27 if the permission is not contained in the permission set. Otherwise, the
28 value -1 is returned and the global variable errno is set to indicate the
29 error.
30
32 If any of the following conditions occur, the acl_get_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 is not a valid acl_perm_t value.
39
41 This is a non-portable, Linux specific extension to the ACL manipulation
42 functions defined in IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned).
43
45 acl_add_perm(3), acl_clear_perms(3), acl_delete_perm(3),
46 acl_get_permset(3), acl_set_permset(3), acl(5)
47
49 Written by Andreas Gruenbacher <a.gruenbacher@bestbits.at>.
50
51Linux ACL March 23, 2002 Linux ACL