]> git.saurik.com Git - apple/libc.git/blame - posix1e/acl_get_permset_mask_np.3
Libc-1158.20.4.tar.gz
[apple/libc.git] / posix1e / acl_get_permset_mask_np.3
CommitLineData
1f2f436a
A
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
19The
20.Fa acl_permset_mask_t
21functions are a Darwin extension to the POSIX.1e ACL standard which allow
22manipulation of permissions in an
23.Fa acl_entry_t
24using a bitmask of type
25.Fa acl_permset_mask_t
26rather than a constructed acl_permset_t (as done by
27.Xr acl_get_permset 3
28and
29.Xr acl_set_permset 3 ) .
30.Pp
31.Fa acl_permset_mask_t
32values may be constructed using bitwise operations over
33.Fa acl_perm_t
34values.
35.Pp
36.Fn acl_maximal_permset_mask_np
37sets the value pointed to by
38.Fa mask_p
39to a bitmask of all valid
40.Fa acl_perm_t
41values.
42.Pp
43.Fn acl_get_permset_mask_np
44returns via
45.Fa mask_p
46a bitmask of permissions set on the ACL entry
47.Fa entry_d .
48.Pp
49.Fn acl_set_permset_mask_np
50sets the permissions of ACL entry
51.Fa entry_d
52to 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
61The
62.Fn acl_get_permset_mask_np
63function fails if:
64.Bl -tag -width Er
65.It Bq Er EINVAL
66Argument
67.Fa entry_d
68is not a valid descriptor for an ACL entry.
69.El
70.Pp
71The
72.Fn acl_set_permset_mask_np
73function fails if:
74.Bl -tag -width Er
75.It Bq Er EINVAL
76Argument
77.Fa entry_d
78is not a valid descriptor for an ACL entry.
79.It Bq Er EINVAL
80Argument
81.Fa mask
82is 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