2 .\" Copyright (c) 2000 Robert N. M. Watson
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 THE 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
26 .\" $FreeBSD: src/lib/libposix1e/acl.3,v 1.2.2.5 2001/12/20 16:27:06 ru Exp $
33 .Nd introduction to the POSIX.1e ACL security API
42 permits file systems to export
43 Access Control Lists via the VFS, and provides a library for userland
44 access to and manipulation of these ACLs, but support for ACLs is not
45 provided by any file systems shipped in the base operating system.
46 The library calls shipped with 4.0 include routines to allocate,
47 duplicate, retrieve, set, and validate ACLs associated with file objects.
48 As well as the POSIX.1e routines, there are a number of non-portable
49 extensions defined that allow for alternative ACL semantics than the
50 POSIX.1e semantics, such as AFS and NTFS semantics. Where
51 routines are non-standard, they are suffixed with _np to indicate that
52 they are not portable.
54 POSIX.1e describes a set of ACL manipulation routines to manage the
55 contents of ACLs, as well as their relationships with files. This
56 manipulation library is not currently implemented in
59 a third party library was under development at the time this document
60 was written. There is a general consensus that the POSIX.1e manipulation
61 routines are ambiguously defined in the specification, and don't meet the
62 needs of most applications. For the time being, applications may
63 directly manipulate the ACL structures, defined in
66 recommended usage is to only ever handle text-form ACLs in applications,
67 generated and maintained using
71 passed directly to and from the management routines. In this manner,
72 an application can remain safely unaware of the contents of ACLs.
74 Available functions, sorted by behavior, include:
76 .Fn acl_delete_def_file ,
77 .Fn acl_delete_file_np ,
80 These functions are described in
82 and may be used to delete ACLs from file system objects.
86 This function is described in
88 and may be used to free userland working ACL storage.
92 This function is described in
94 and may be used to convert a text-form ACL into working ACL state, if
95 the ACL has POSIX.1e semantics.
101 These functions are described in
103 and may be used to retrieve ACLs from file system objects.
107 This function is described in
109 and may be used to allocate a fresh (empty) ACL structure.
113 This function is described in
115 and may be used to duplicate an ACL structure.
121 These functions are described in
123 and may be used to assign an ACL to a file system object.
127 This function is described in
129 and may be used to generate a text-form of a POSIX.1e semantics ACL.
132 .Fn acl_valid_file_np ,
135 Thee functions are described in
137 and may be used to validate an ACL as correct POSIX.1e-semantics, or
138 as appropriate for a particular file system object regardless of semantics.
140 Documentation of the internal kernel interfaces backing these calls may
143 The syscalls between the internal interfaces and the public library
144 routines may change over time, and as such are not documented. They are
145 not intended to be called directly without going through the library.
146 .Sh IMPLEMENTATION NOTES
148 support for POSIX.1e interfaces and features is still under
149 development at this time.
151 POSIX.1e assigns security labels to all objects, extending the security
152 functionality described in POSIX.1. These additional labels provide
153 fine-grained discretionary access control, fine-grained capabilities,
154 and labels necessary for mandatory access control. POSIX.2c describes
155 a set of userland utilities for manipulating these labels. These userland
156 utilities are not bundled with
158 so as to discourage their
159 use in the short term.
165 .Xr acl_from_text 3 ,
172 POSIX.1e is described in IEEE POSIX.1e draft 17. Discussion
173 of the draft continues on the cross-platform POSIX.1e implementation
174 mailing list. To join this list, see the
176 POSIX.1e implementation
177 page for more information.
179 POSIX.1e support was introduced in
181 and development continues.
183 .An Robert N M Watson
185 These features are not yet fully implemented. In particular, the shipped
186 version of UFS/FFS does not support storage of additional security labels,
187 and so is unable to (easily) provide support for most of these features.