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
28 .\" TrustedBSD Project - support for POSIX.1e process capabilities
35 .Nd introduction to the POSIX.1e Capability security API
37 .Fd #include <sys/types.h>
38 .Fd #include <sys/cap.h>
40 The POSIX.1e Capability interface allows processes to manipulate their
41 capability set, subject to capability manipulation restrictions imposed
42 by the kernel. Using the capability API, a process may request a copy
43 of its capability state, modify the copy of the state, and resubmit the
44 state for use, if permitted.
46 A variety of functions are provided for manipulating and managing
47 process capability state and working store state:
51 This function is described in
53 and may be used to allocate a fresh capability structure with no capability
58 This function is described in
60 and clears all capability flags in a capability structure.
64 This function is described in
66 and may be used to duplicate a capability structure.
70 This function is described in
72 and may be used to free a capability structure.
77 These functions, described in
81 allow retrieval of capability flags from a file, and capability state from
87 These functions, described in
91 allow setting of the capability flags for a file, and capability state for
94 Documentation of the internal kernel interfaces backing these calls may
97 The syscalls between the internal interfaces and the public library
98 routines may change over time, and as such are not documented. They are
99 not intended to be called directly without going through the library.
100 .Sh IMPLEMENTATION NOTES
101 FreeBSD's support for POSIX.1e interfaces and features is still under
102 development at this time.
104 POSIX.1e assigns security labels to all objects, extending the security
105 functionality described in POSIX.1. These additional labels provide
106 fine-grained discretionary access control, fine-grained capabilities,
107 and labels necessary for mandatory access control. POSIX.2c describes
108 a set of userland utilities for manipulating these labels. These userland
109 utilities are not bundled with
111 so as to discourage their
112 use in the short term.
126 POSIX.1e is described in IEEE POSIX.1e draft 17. Discussion
127 of the draft continues on the cross-platform POSIX.1e implementation
128 mailing list. To join this list, see the
130 POSIX.1e implementation
131 page for more information.
133 Support for POSIX.1e Capabilities was developed as part of the TrustedBSD
135 POSIX.1e support was introduced in
137 and development continues.
139 .An Robert N M Watson
141 These features are not yet included in the base FreeBSD distribution.