]> git.saurik.com Git - apple/libc.git/blob - posix1e/acl_get_permset_mask_np.3
Libc-1439.100.3.tar.gz
[apple/libc.git] / posix1e / acl_get_permset_mask_np.3
1 .Dd August 24, 2010
2 .Os Darwin
3 .Dt ACL_PERMSET_MASK 3
4 .Sh NAME
5 .Nm acl_permset_mask
6 .Nd Manipulate ACL permissions using bitmasks
7 .Sh LIBRARY
8 .Lb libc
9 .Sh SYNOPSIS
10 .In sys/types.h
11 .In sys/acl.h
12 .Ft int
13 .Fn acl_maximal_permset_mask_np "acl_permset_mask_t * mask_p"
14 .Ft int
15 .Fn acl_get_permset_mask_np "acl_entry_t entry_d" "acl_permset_mask_t * mask_p"
16 .Ft int
17 .Fn acl_set_permset_mask_np "acl_entry_t entry_d" "acl_permset_mask_t mask"
18 .Sh DESCRIPTION
19 The
20 .Fa acl_permset_mask_t
21 functions are a Darwin extension to the POSIX.1e ACL standard which allow
22 manipulation of permissions in an
23 .Fa acl_entry_t
24 using a bitmask of type
25 .Fa acl_permset_mask_t
26 rather than a constructed acl_permset_t (as done by
27 .Xr acl_get_permset 3
28 and
29 .Xr acl_set_permset 3 ) .
30 .Pp
31 .Fa acl_permset_mask_t
32 values may be constructed using bitwise operations over
33 .Fa acl_perm_t
34 values.
35 .Pp
36 .Fn acl_maximal_permset_mask_np
37 sets the value pointed to by
38 .Fa mask_p
39 to a bitmask of all valid
40 .Fa acl_perm_t
41 values.
42 .Pp
43 .Fn acl_get_permset_mask_np
44 returns via
45 .Fa mask_p
46 a bitmask of permissions set on the ACL entry
47 .Fa entry_d .
48 .Pp
49 .Fn acl_set_permset_mask_np
50 sets the permissions of ACL entry
51 .Fa entry_d
52 to match the permission bitmask provided by
53 .Fa mask .
54 .Sh RETURN VALUES
55 .Rv -std acl_maximal_permset_mask_np
56 .Pp
57 .Rv -std acl_get_permset_mask_np
58 .Pp
59 .Rv -std acl_set_permset_mask_np
60 .Sh ERRORS
61 The
62 .Fn acl_get_permset_mask_np
63 function fails if:
64 .Bl -tag -width Er
65 .It Bq Er EINVAL
66 Argument
67 .Fa entry_d
68 is not a valid descriptor for an ACL entry.
69 .El
70 .Pp
71 The
72 .Fn acl_set_permset_mask_np
73 function fails if:
74 .Bl -tag -width Er
75 .It Bq Er EINVAL
76 Argument
77 .Fa entry_d
78 is not a valid descriptor for an ACL entry.
79 .It Bq Er EINVAL
80 Argument
81 .Fa mask
82 is not a valid bitmask of ACL permissions.
83 .El
84 .Sh SEE ALSO
85 .Xr acl 3 ,
86 .Xr acl_add_perm 3 ,
87 .Xr acl_clear_perms 3 ,
88 .Xr acl_delete_perm 3 ,
89 .Xr acl_get_permset 3 ,
90 .Xr acl_set_permset 3 ,
91 .Xr posix1e 3
92 .Sh AUTHORS
93 .An Jeremy Huddleston