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

NAME

4     acl_calc_mask — calculate the file group class mask
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_calc_mask(acl_t *acl_p);
15

DESCRIPTION

17     The acl_calc_mask() function calculates and sets the permissions associ‐
18     ated with the ACL_MASK ACL entry of the ACL referred to by acl_p.  The
19     value of the new permissions is the union of the permissions granted by
20     all entries of tag type ACL_GROUP, ACL_GROUP_OBJ, or ACL_USER.  If the
21     ACL referred to by acl_p already contains an ACL_MASK entry, its permis‐
22     sions are overwritten; if it does not contain an ACL_MASK entry, one is
23     added.
24
25     If the ACL referred to by acl_p does not contain enough space for the new
26     ACL entry, then additional working storage may be allocated. If the work‐
27     ing storage cannot be increased in the current location, then it may be
28     relocated and the previous working storage is released and a pointer to
29     the new working storage is returned via acl_p.
30
31     The order of existing entries in the ACL is undefined after this func‐
32     tion.
33
34     Any existing ACL entry descriptors that refer to entries in the ACL con‐
35     tinue to refer to those entries. Any existing ACL pointers that refer to
36     the ACL referred to by acl_p continue to refer to the ACL.
37

RETURN VALUE

39     The acl_calc_mask() function returns the value 0 if successful; otherwise
40     the value -1 is returned and the global variable errno is set to indicate
41     the error.
42

ERRORS

44     If any of the following conditions occur, the acl_calc_mask() function
45     returns -1 and sets errno to the corresponding value:
46
47     [EINVAL]           The argument acl is not a valid pointer to an ACL.
48
49     [ENOMEM]           The acl_calc_mask() function is unable to allocate the
50                        memory required for an ACL_MASK ACL entry.
51

STANDARDS

53     IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned)
54

SEE ALSO

56     acl_check(3), acl_get_entry(3), acl_valid(3), acl(5)
57

AUTHOR

59     Derived from the FreeBSD manual pages written by Robert N M Watson
60     <rwatson@FreeBSD.org>, and adapted for Linux by Andreas Gruenbacher
61     <andreas.gruenbacher@gmail.com>.
62
63Linux ACL                       March 23, 2002                       Linux ACL
Impressum