2 .\" Copyright (c) 2001 Chris D. Faulhaber
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .Nd add permissions to a permission set
40 .Fn acl_add_perm "acl_permset_t permset_d" "acl_perm_t perm"
45 is a POSIX.1e call that adds the permission contained in
50 Note: it is not considered an error to attempt to add permissions
51 that already exist in the permission set.
53 For POSIX.1e ACLs, valid values are:
55 .Bl -column -offset 3n "ACL_WRITE_NAMED_ATTRS"
56 .It ACL_EXECUTE Execute permission
57 .It ACL_WRITE Write permission
58 .It ACL_READ Read permission
61 For NFSv4 ACLs, valid values are:
63 .Bl -column -offset 3n "ACL_WRITE_NAMED_ATTRS"
64 .It ACL_READ_DATA Read permission
65 .It ACL_LIST_DIRECTORY Same as ACL_READ_DATA
66 .It ACL_WRITE_DATA Write permission, or permission to create files
67 .It ACL_ADD_FILE Same as ACL_READ_DATA
68 .It ACL_APPEND_DATA Permission to create directories. Ignored for files
69 .It ACL_ADD_SUBDIRECTORY Same as ACL_APPEND_DATA
70 .It ACL_READ_NAMED_ATTRS Ignored
71 .It ACL_WRITE_NAMED_ATTRS Ignored
72 .It ACL_EXECUTE Execute permission
73 .It ACL_DELETE_CHILD Permission to delete files and subdirectories
74 .It ACL_READ_ATTRIBUTES Permission to read basic attributes
75 .It ACL_WRITE_ATTRIBUTES Permission to change basic attributes
76 .It ACL_DELETE Permission to delete the object this ACL is placed on
77 .It ACL_READ_ACL Permission to read ACL
78 .It ACL_WRITE_ACL Permission to change the ACL and file mode
79 .It ACL_SYNCHRONIZE Ignored
86 equal to ACL_WRITE or ACL_READ brands the ACL as POSIX.
87 Calling it with ACL_READ_DATA, ACL_LIST_DIRECTORY, ACL_WRITE_DATA,
88 ACL_ADD_FILE, ACL_APPEND_DATA, ACL_ADD_SUBDIRECTORY, ACL_READ_NAMED_ATTRS,
89 ACL_WRITE_NAMED_ATTRS, ACL_DELETE_CHILD, ACL_READ_ATTRIBUTES,
90 ACL_WRITE_ATTRIBUTES, ACL_DELETE, ACL_READ_ACL, ACL_WRITE_ACL
91 or ACL_SYNCHRONIZE brands the ACL as NFSv4.
102 is not a valid descriptor for a permission set within an ACL entry.
105 does not contain a valid
108 ACL is already branded differently.
112 .Xr acl_clear_perms 3 ,
113 .Xr acl_delete_perm 3 ,
114 .Xr acl_get_brand_np 3 ,
115 .Xr acl_get_permset 3 ,
116 .Xr acl_set_permset 3 ,
119 POSIX.1e is described in IEEE POSIX.1e draft 17.
121 POSIX.1e support was introduced in
125 function was added in
130 function was written by
131 .An Chris D. Faulhaber Aq jedgar@fxp.org .