1ACL_EQUIV_MODE(3) BSD Library Functions Manual ACL_EQUIV_MODE(3)
2
4 acl_equiv_mode — check for an equivalent ACL
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_equiv_mode(acl_t acl, mode_t *mode_p);
15
17 The acl_equiv_mode() function checks if the ACL pointed to by the argu‐
18 ment acl contains only the required ACL entries of tag types
19 ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER, and contains no permissions
20 other that ACL_READ, ACL_WRITE or ACL_EXECUTE. If the ACL has this form,
21 it can can be fully represented with the traditional file permission
22 bits, and is considered equivalent with the traditional file permission
23 bits.
24
25 If acl is an equivalent ACL and the pointer mode_p is not NULL, the value
26 pointed to by mode_p is set to the value that defines the same owner,
27 group and other permissions as contained in the ACL.
28
30 On success, this function returns the value 0 if acl is an equivalent
31 ACL, and the value 1 if acl is not an equivalent ACL. On error, the value
32 -1 is returned, and errno is set appropriately.
33
35 If any of the following conditions occur, the acl_equiv_mode() function
36 returns the value -1 and sets errno to the corresponding value:
37
38 [EINVAL] The argument acl is not a valid pointer to an ACL.
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_from_mode(3), acl(5)
46
48 Written by Andreas Gruenbacher <a.gruenbacher@bestbits.at>.
49
50Linux ACL March 23, 2002 Linux ACL