]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libc/posix1e/cap_init.3
This commit was generated by cvs2svn to compensate for changes in r77424,
[FreeBSD/FreeBSD.git] / lib / libc / posix1e / cap_init.3
1 .\"-
2 .\" Copyright (c) 2000 Robert N. M. Watson
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
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.
13 .\"
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
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .\" TrustedBSD Project - support for POSIX.1e process capabilities 
29 .\"
30 .Dd April 1, 2000
31 .Dt CAP_INIT 3
32 .Os FreeBSD
33 .Sh NAME
34 .Nm cap_init
35 .Nd allocate and initialize a capability state in working storage
36 .Sh LIBRARY
37 .Lb libc
38 .Sh SYNOPSIS
39 .Fd #include <sys/types.h>
40 .Fd #include <sys/capability.h>
41 .Ft cap_t
42 .Fn cap_init "void"
43 .Sh DESCRIPTION
44 The function
45 .Fn cap_init
46 shall create a capability state in working storage and return a pointer to
47 the capability state.
48 The initial value of all flags for all capabilities defined by the
49 implementation shall be cleared.
50 .Pp
51 This function may cause memory to be allocated.
52 The caller should free any releasable memory, when the capability state in
53 working storage is no longer required, by calling
54 .Fn cap_free
55 with the cap_t as an argument.
56 .Sh IMPLEMENTATION NOTES
57 .Fx Ns 's
58 support for POSIX.1e interfaces and features is still under
59 development at this time.
60 .Sh RETURN VALUES
61 Upon successful completion, the
62 .Fn cap_init
63 function returns a non-NULL cap_t value.
64 Otherwise, a value of
65 .Va (cap_t)NULL
66 shall be returned and
67 .Va errno
68 shall be set to indicate the error.
69 .Sh ERRORS
70 If any of the following conditions occur, the
71 .Fn cap_dup
72 function shall return
73 .Va (cap_t)NULL
74 and set
75 .Va errno
76 to the corresponding value:
77 .Bl -tag -width Er
78 .It Bq Er ENOMEM
79 The capability state to be returned requires more memory than is allowed by
80 the hardware or system-imposed memory management constraints.
81 .El
82 .Sh SEE ALSO
83 .Xr cap 3 ,
84 .Xr cap_free 3 ,
85 .Xr posix1e 3
86 .Sh STANDARDS
87 POSIX.1e is described in IEEE POSIX.1e draft 17.  Discussion
88 of the draft continues on the cross-platform POSIX.1e implementation
89 mailing list.  To join this list, see the
90 .Fx
91 POSIX.1e implementation
92 page for more information.
93 .Sh HISTORY
94 Support for POSIX.1e Capabilities was developed as part of the TrustedBSD
95 Project.
96 POSIX.1e Capability support was introduced in
97 .Fx 5.0 ,
98 and development continues.
99 .Sh AUTHORS
100 .An Robert N M Watson