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,
227 seperated by a colon.
228 The subject can be required to be in a particular jail with the
235 .Cm uid Ar uid | minuid:maxuid
239 .Cm gid Ar gid | mingid:maxgid
266 The rule will apply only to objects matching all the specified conditions.
269 means that the object should not match all the remaining conditions.
270 A condition may be prefixed by
272 to indicate that particular condition must not match the object.
273 Objects can be required to be owned by the user and/or group specified by
277 A range of uids/gids can be specified, seperated by a colon.
278 The object can be required to be in a particular filesystem by
279 specifing the filesystem using
282 if the filesystem is unmounted and remounted,
283 then the rule may need to be reapplied to ensure the correct filesystem
285 The object can be required to have the
290 The owner of the object can be required to match the
294 attempting the operation.
295 The type of the object can be restricted to a subset of
298 .Bl -tag -width ".Cm w" -compact -offset indent
306 a block special device
308 a character special device
316 .It Cm mode Ar arswxn
319 each character represents an access mode.
321 the specified access permissions are enforced
323 When a character is specified in the rule,
324 the rule will allow for the operation.
325 Conversely, not including it will cause the operation
327 The definitions of each character are as follows:
329 .Bl -tag -width ".Cm w" -compact -offset indent
331 administrative operations
335 access to file attributes
344 .It Cm remove Ar rulenum
345 Disable and remove the rule with the specified rule number.
348 .Xr mac_bsdextended 4 ,
353 utility first appeared in
356 This software was contributed to the
358 Project by NAI Labs, the Security Research Division of Network Associates
359 Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035
361 as part of the DARPA CHATS research program.