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:
48 .Bl -tag -width cap_get_flagXX
50 This function is described in
52 and may be used to allocate a fresh capability structure with no capability
55 This function is described in
57 and clears all capability flags in a capability structure.
59 This function is described in
61 and may be used to duplicate a capability structure.
63 This function is described in
65 and may be used to free a capability structure.
67 This function, described in
69 allows retrieval of a capability flag value from capability state in
72 This function, described in
74 allows retrieval of capability state for the current process.
76 This function, described in
78 allows setting of capability flag values in a capability structure held
81 This function, described in
83 allows setting of the current process capability state.
86 Documentation of the internal kernel interfaces backing these calls may
89 The syscalls between the internal interfaces and the public library
90 routines may change over time, and as such are not documented. They are
91 not intended to be called directly without going through the library.
92 .Sh IMPLEMENTATION NOTES
93 FreeBSD's support for POSIX.1e interfaces and features is still under
94 development at this time.
96 POSIX.1e assigns security labels to all objects, extending the security
97 functionality described in POSIX.1. These additional labels provide
98 fine-grained discretionary access control, fine-grained capabilities,
99 and labels necessary for mandatory access control. POSIX.2c describes
100 a set of userland utilities for manipulating these labels. These userland
101 utilities are not bundled with
103 so as to discourage their
104 use in the short term.
118 POSIX.1e is described in IEEE POSIX.1e draft 17. Discussion
119 of the draft continues on the cross-platform POSIX.1e implementation
120 mailing list. To join this list, see the
122 POSIX.1e implementation
123 page for more information.
125 Support for POSIX.1e Capabilities was developed as part of the TrustedBSD
127 POSIX.1e support was introduced in
129 and development continues.
131 .An Robert N M Watson
133 These features are not yet included in the base FreeBSD distribution.