4555 macro side-effects with /usr/include/libelf.h
[illumos-gate.git] / usr / src / man / man3perl / Privilege.3perl
blob0b0ad0548dbfb55f677f62efeaeb0e7c7f1a41f3
1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PRIVILEGE 3PERL "Jan 30, 2004"
7 .SH NAME
8 Privilege \- Perl interface to Privileges
9 .SH SYNOPSIS
10 .LP
11 .nf
12 use Sun::Solaris::Privilege qw(:ALL);
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 This module provides wrappers for the Privilege-related system and library
19 calls. Also provided are constants from the various Privilege-related headers
20 and dynamically-generated constants for all the privileges and privilege sets.
21 .SS "Constants"
22 .sp
23 .LP
24 \fBPRIV_STR_SHORT\fR, \fBPRIV_STR_LIT\fR, \fBPRIV_STR_PORT\fR, \fBPRIV_ON\fR,
25 \fBPRIV_OFF\fR, \fBPRIV_SET\fR, \fBPRIV_AWARE\fR, and \fBPRIV_DEBUG\fR.
26 .SS "Functions"
27 .sp
28 .ne 2
29 .na
30 \fB\fBgetppriv($which)\fR\fR
31 .ad
32 .sp .6
33 .RS 4n
34 This function returns the process privilege set specified by
35 \fB\fR\fB$which\fR.
36 .RE
38 .sp
39 .ne 2
40 .na
41 \fB\fBsetppriv($op, $which, $set)\fR\fR
42 .ad
43 .sp .6
44 .RS 4n
45 This function modified the privilege set specified by $which in the as
46 specified by the \fB$op\fR and \fB$set\fR arguments. If \fB$op\fR is
47 \fBPRIV_ON\fR, the privileges in \fB$set\fR are added to the set specified. If
48 \fB$op\fR is \fBPRIV_OFF\fR, the privileges in \fB$set\fR are removed from the
49 set specified. If \fB$op\fR is \fBPRIV_SET\fR, the specified set is made equal
50 to \fB$set\fR.
51 .RE
53 .sp
54 .ne 2
55 .na
56 \fB\fBgetpflags($flag)\fR\fR
57 .ad
58 .sp .6
59 .RS 4n
60 This function returns the value associated with process \fB$flag\fR or
61 \fBundef\fR on error. Possible values for \fB$flag\fR are \fBPRIV_AWARE\fR and
62 \fBPRIV_DEBUG\fR.
63 .RE
65 .sp
66 .ne 2
67 .na
68 \fB\fBsetppflags($flag, $val)\fR\fR
69 .ad
70 .sp .6
71 .RS 4n
72 This function sets the process flag \fB$flag\fR to \fB$val\fR.
73 .RE
75 .sp
76 .ne 2
77 .na
78 \fB\fBpriv_fillset()\fR\fR
79 .ad
80 .sp .6
81 .RS 4n
82 This function returns a new privilege set with all privileges set.
83 .RE
85 .sp
86 .ne 2
87 .na
88 \fB\fBpriv_emptyset()\fR\fR
89 .ad
90 .sp .6
91 .RS 4n
92 This function returns a new empty privilege set.
93 .RE
95 .sp
96 .ne 2
97 .na
98 \fB\fBpriv_isemptyset($set)\fR\fR
99 .ad
100 .sp .6
101 .RS 4n
102 This function returns whether or not \fB$set\fR is empty.
106 .ne 2
108 \fB\fBpriv_isfullset($set)\fR\fR
110 .sp .6
111 .RS 4n
112 This function returns whether or not \fB$set\fR is full.
116 .ne 2
118 \fB\fBpriv_isequalset($a, $b)\fR\fR
120 .sp .6
121 .RS 4n
122 This function returns whether sets \fB$a\fR and \fB$b\fR are equal.
126 .ne 2
128 \fB\fBpriv_issubset($a, $b)\fR\fR
130 .sp .6
131 .RS 4n
132 This function returns whether set \fB$a\fR is a subset of \fB$b\fR.
136 .ne 2
138 \fB\fBpriv_ismember($set, $priv)\fR\fR
140 .sp .6
141 .RS 4n
142 This function returns whether \fB$priv\fR is a member of \fB$set\fR.
146 .ne 2
148 \fB\fBpriv_ineffect($priv)\fR\fR
150 .sp .6
151 .RS 4n
152 This function returned whether \fB$priv\fR is in the process's effective set.
156 .ne 2
158 \fB\fBpriv_intersect($a, $b)\fR\fR
160 .sp .6
161 .RS 4n
162 This function returns a new privilege set which is the intersection of \fB$a\fR
163 and \fB$b\fR.
167 .ne 2
169 \fB\fBpriv_union($a, $b)\fR\fR
171 .sp .6
172 .RS 4n
173 This function returns a new privilege set which is the union of \fB$a\fR and
174 \fB$b\fR.
178 .ne 2
180 \fB\fBpriv_inverse($a)\fR\fR
182 .sp .6
183 .RS 4n
184 This function returns a new privilege set which is the inverse of \fB$a\fR.
188 .ne 2
190 \fB\fBpriv_addset($set, $priv)\fR\fR
192 .sp .6
193 .RS 4n
194 This functon adds the privilege \fB$priv\fR to \fB$set\fR.
198 .ne 2
200 \fB\fBpriv_copyset($a)\fR\fR
202 .sp .6
203 .RS 4n
204 This function returns a copy of the privilege set \fB$a\fR.
208 .ne 2
210 \fB\fBpriv_delset($set, $priv)\fR\fR
212 .sp .6
213 .RS 4n
214 This function remove the privilege \fB$priv\fR from \fB$set\fR.
217 .SS "Class methods"
220 None.
221 .SS "Object methods"
224 None.
225 .SS "Exports"
228 By default nothing is exported from this module. The following tags can be used
229 to selectively import constants and functions defined in this module:
231 .ne 2
233 \fB\fB:SYSCALLS\fR\fR
235 .RS 14n
236 \fBgetppriv()\fR, \fBsetppriv()\fR
240 .ne 2
242 \fB\fB:LIBCALLS\fR\fR
244 .RS 14n
245 \fBpriv_addset()\fR, \fBpriv_copyset()\fR, \fBpriv_delset()\fR,
246 \fBpriv_emptyset()\fR, \fBpriv_fillset()\fR, \fBpriv_intersect()\fR,
247 \fBpriv_inverse()\fR, \fBpriv_isemptyset()\fR, \fBpriv_isequalset()\fR,
248 \fBpriv_isfullset()\fR, \fBpriv_ismember()\fR, \fBpriv_issubset()\fR,
249 \fBpriv_gettext()\fR, \fBpriv_union()\fR, \fBpriv_set_to_str()\fR,
250 \fBpriv_str_to_set()\fR
254 .ne 2
256 \fB\fB:CONSTANTS\fR\fR
258 .RS 14n
259 \fBPRIV_STR_SHORT\fR, \fBPRIV_STR_LIT\fR, \fBPRIV_STR_PORT\fR, \fBPRIV_ON\fR,
260 \fBPRIV_OFF\fR, \fBPRIV_SET\fR, \fBPRIV_AWARE\fR, \fBPRIV_DEBUG\fR, plus
261 constants for all privileges and privilege sets.
265 .ne 2
267 \fB\fB:VARIABLES\fR\fR
269 .RS 14n
270 \fB%PRIVILEGES\fR, \fB%PRIVSETS\fR
274 .ne 2
276 \fB\fB:ALL\fR\fR
278 .RS 14n
279 \fB:SYSCALLS\fR, \fB:LIBCALLS\fR, \fB:CONSTANTS\fR, \fB:VARIABLES\fR
282 .SH ATTRIBUTES
285 See \fBattributes\fR(5) for descriptions of the following attributes:
290 box;
291 c | c
292 l | l .
293 ATTRIBUTE TYPE  ATTRIBUTE VALUE
295 Interface Stability     Evolving
298 .SH SEE ALSO
301 \fBgetpflags\fR(2), \fBgetppriv\fR(2), \fBpriv_addset\fR(3C),
302 \fBpriv_set\fR(3C), \fBpriv_str_to_set\fR(3C), \fBattributes\fR(5),
303 \fBprivileges\fR(5)