1 .\" Copyright (c) 2002, 2004 Networks Associates Technology, Inc.
2 .\" All rights reserved.
4 .\" This software was developed for the FreeBSD Project by Chris
5 .\" Costello at Safeport Network Services and NAI Labs, the Security
6 .\" Research Division of Network Associates, Inc. under DARPA/SPAWAR
7 .\" contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\" notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\" notice, this list of conditions and the following disclaimer in the
17 .\" documentation and/or other materials provided with the distribution.
19 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 .Nd "firewall-like access controls for file system objects"
46 .Cm uid Ar uid | minuid:maxuid
50 .Cm gid Ar gid | mingid:maxgid
60 .Cm uid Ar uid | minuid:maxuid
64 .Cm gid Ar gid | mingid:maxgid
101 .Cm uid Ar uid | minuid:maxuid
105 .Cm gid Ar gid | mingid:maxgid
115 .Cm uid Ar uid | minuid:maxuid
119 .Cm gid Ar gid | mingid:maxgid
155 interface to manage access to file system objects by UID and GID,
157 .Xr mac_bsdextended 4
161 The arguments are as follows:
162 .Bl -tag -width indent -offset indent
172 Add a new rule, automatically selecting the rule number.
173 See the description of
175 for syntax information.
177 Produces a list of all the current
189 Add a new rule or modify an existing rule.
190 The arguments are as follows:
191 .Bl -tag -width ".Ar rulenum"
194 Entries with a lower rule number
196 placing the most frequently-matched rules at the beginning of the list
197 (i.e., lower-numbered)
198 will yield a slight performance increase.
204 .Cm uid Ar uid | minuid:maxuid
208 .Cm gid Ar gid | mingid:maxgid
215 Subjects performing an operation must match all the conditions given.
218 means that the subject should not match the remainder of the specification.
219 A condition may be prefixed by
221 to indicate that particular condition must not match the subject.
222 The subject can be required to have a particular
226 A range of uids/gids can be specified, separated by a colon.
227 The subject can be required to be in a particular jail with the
234 .Cm uid Ar uid | minuid:maxuid
238 .Cm gid Ar gid | mingid:maxgid
265 The rule will apply only to objects matching all the specified conditions.
268 means that the object should not match all the remaining conditions.
269 A condition may be prefixed by
271 to indicate that particular condition must not match the object.
272 Objects can be required to be owned by the user and/or group specified by
276 A range of uids/gids can be specified, separated by a colon.
277 The object can be required to be in a particular filesystem by
278 specifying the filesystem using
281 if the filesystem is unmounted and remounted,
282 then the rule may need to be reapplied to ensure the correct filesystem
284 The object can be required to have the
289 The owner of the object can be required to match the
293 attempting the operation.
294 The type of the object can be restricted to a subset of
297 .Bl -tag -width ".Cm w" -compact -offset indent
305 a block special device
307 a character special device
315 .It Cm mode Ar arswxn
318 each character represents an access mode.
320 the specified access permissions are enforced
322 When a character is specified in the rule,
323 the rule will allow for the operation.
324 Conversely, not including it will cause the operation
326 The definitions of each character are as follows:
328 .Bl -tag -width ".Cm w" -compact -offset indent
330 administrative operations
334 access to file attributes
343 .It Cm remove Ar rulenum
344 Disable and remove the rule with the specified rule number.
347 .Xr mac_bsdextended 4 ,
352 utility first appeared in
355 This software was contributed to the
357 Project by NAI Labs, the Security Research Division of Network Associates
358 Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035
360 as part of the DARPA CHATS research program.