summaryrefslogtreecommitdiff
path: root/usr/src/man/man3perl/Privilege.3perl
blob: 0b0ad0548dbfb55f677f62efeaeb0e7c7f1a41f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
'\" te
.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
.\" 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.
.\" 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.
.\" 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]
.TH PRIVILEGE 3PERL "Jan 30, 2004"
.SH NAME
Privilege \- Perl interface to Privileges
.SH SYNOPSIS
.LP
.nf
use Sun::Solaris::Privilege qw(:ALL);
.fi

.SH DESCRIPTION
.sp
.LP
This module provides wrappers for the Privilege-related system and library
calls. Also provided are constants from the various Privilege-related headers
and dynamically-generated constants for all the privileges and privilege sets.
.SS "Constants"
.sp
.LP
\fBPRIV_STR_SHORT\fR, \fBPRIV_STR_LIT\fR, \fBPRIV_STR_PORT\fR, \fBPRIV_ON\fR,
\fBPRIV_OFF\fR, \fBPRIV_SET\fR, \fBPRIV_AWARE\fR, and \fBPRIV_DEBUG\fR.
.SS "Functions"
.sp
.ne 2
.na
\fB\fBgetppriv($which)\fR\fR
.ad
.sp .6
.RS 4n
This function returns the process privilege set specified by
\fB\fR\fB$which\fR.
.RE

.sp
.ne 2
.na
\fB\fBsetppriv($op, $which, $set)\fR\fR
.ad
.sp .6
.RS 4n
This function modified the privilege set specified by $which in the as
specified by the \fB$op\fR and \fB$set\fR arguments. If \fB$op\fR is
\fBPRIV_ON\fR, the privileges in \fB$set\fR are added to the set specified. If
\fB$op\fR is \fBPRIV_OFF\fR, the privileges in \fB$set\fR are removed from the
set specified. If \fB$op\fR is \fBPRIV_SET\fR, the specified set is made equal
to \fB$set\fR.
.RE

.sp
.ne 2
.na
\fB\fBgetpflags($flag)\fR\fR
.ad
.sp .6
.RS 4n
This function returns the value associated with process \fB$flag\fR or
\fBundef\fR on error. Possible values for \fB$flag\fR are \fBPRIV_AWARE\fR and
\fBPRIV_DEBUG\fR.
.RE

.sp
.ne 2
.na
\fB\fBsetppflags($flag, $val)\fR\fR
.ad
.sp .6
.RS 4n
This function sets the process flag \fB$flag\fR to \fB$val\fR.
.RE

.sp
.ne 2
.na
\fB\fBpriv_fillset()\fR\fR
.ad
.sp .6
.RS 4n
This function returns a new privilege set with all privileges set.
.RE

.sp
.ne 2
.na
\fB\fBpriv_emptyset()\fR\fR
.ad
.sp .6
.RS 4n
This function returns a new empty privilege set.
.RE

.sp
.ne 2
.na
\fB\fBpriv_isemptyset($set)\fR\fR
.ad
.sp .6
.RS 4n
This function returns whether or not \fB$set\fR is empty.
.RE

.sp
.ne 2
.na
\fB\fBpriv_isfullset($set)\fR\fR
.ad
.sp .6
.RS 4n
This function returns whether or not \fB$set\fR is full.
.RE

.sp
.ne 2
.na
\fB\fBpriv_isequalset($a, $b)\fR\fR
.ad
.sp .6
.RS 4n
This function returns whether sets \fB$a\fR and \fB$b\fR are equal.
.RE

.sp
.ne 2
.na
\fB\fBpriv_issubset($a, $b)\fR\fR
.ad
.sp .6
.RS 4n
This function returns whether set \fB$a\fR is a subset of \fB$b\fR.
.RE

.sp
.ne 2
.na
\fB\fBpriv_ismember($set, $priv)\fR\fR
.ad
.sp .6
.RS 4n
This function returns whether \fB$priv\fR is a member of \fB$set\fR.
.RE

.sp
.ne 2
.na
\fB\fBpriv_ineffect($priv)\fR\fR
.ad
.sp .6
.RS 4n
This function returned whether \fB$priv\fR is in the process's effective set.
.RE

.sp
.ne 2
.na
\fB\fBpriv_intersect($a, $b)\fR\fR
.ad
.sp .6
.RS 4n
This function returns a new privilege set which is the intersection of \fB$a\fR
and \fB$b\fR.
.RE

.sp
.ne 2
.na
\fB\fBpriv_union($a, $b)\fR\fR
.ad
.sp .6
.RS 4n
This function returns a new privilege set which is the union of \fB$a\fR and
\fB$b\fR.
.RE

.sp
.ne 2
.na
\fB\fBpriv_inverse($a)\fR\fR
.ad
.sp .6
.RS 4n
This function returns a new privilege set which is the inverse of \fB$a\fR.
.RE

.sp
.ne 2
.na
\fB\fBpriv_addset($set, $priv)\fR\fR
.ad
.sp .6
.RS 4n
This functon adds the privilege \fB$priv\fR to \fB$set\fR.
.RE

.sp
.ne 2
.na
\fB\fBpriv_copyset($a)\fR\fR
.ad
.sp .6
.RS 4n
This function returns a copy of the privilege set \fB$a\fR.
.RE

.sp
.ne 2
.na
\fB\fBpriv_delset($set, $priv)\fR\fR
.ad
.sp .6
.RS 4n
This function remove the privilege \fB$priv\fR from \fB$set\fR.
.RE

.SS "Class methods"
.sp
.LP
None.
.SS "Object methods"
.sp
.LP
None.
.SS "Exports"
.sp
.LP
By default nothing is exported from this module. The following tags can be used
to selectively import constants and functions defined in this module:
.sp
.ne 2
.na
\fB\fB:SYSCALLS\fR\fR
.ad
.RS 14n
\fBgetppriv()\fR, \fBsetppriv()\fR
.RE

.sp
.ne 2
.na
\fB\fB:LIBCALLS\fR\fR
.ad
.RS 14n
\fBpriv_addset()\fR, \fBpriv_copyset()\fR, \fBpriv_delset()\fR,
\fBpriv_emptyset()\fR, \fBpriv_fillset()\fR, \fBpriv_intersect()\fR,
\fBpriv_inverse()\fR, \fBpriv_isemptyset()\fR, \fBpriv_isequalset()\fR,
\fBpriv_isfullset()\fR, \fBpriv_ismember()\fR, \fBpriv_issubset()\fR,
\fBpriv_gettext()\fR, \fBpriv_union()\fR, \fBpriv_set_to_str()\fR,
\fBpriv_str_to_set()\fR
.RE

.sp
.ne 2
.na
\fB\fB:CONSTANTS\fR\fR
.ad
.RS 14n
\fBPRIV_STR_SHORT\fR, \fBPRIV_STR_LIT\fR, \fBPRIV_STR_PORT\fR, \fBPRIV_ON\fR,
\fBPRIV_OFF\fR, \fBPRIV_SET\fR, \fBPRIV_AWARE\fR, \fBPRIV_DEBUG\fR, plus
constants for all privileges and privilege sets.
.RE

.sp
.ne 2
.na
\fB\fB:VARIABLES\fR\fR
.ad
.RS 14n
\fB%PRIVILEGES\fR, \fB%PRIVSETS\fR
.RE

.sp
.ne 2
.na
\fB\fB:ALL\fR\fR
.ad
.RS 14n
\fB:SYSCALLS\fR, \fB:LIBCALLS\fR, \fB:CONSTANTS\fR, \fB:VARIABLES\fR
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Evolving
.TE

.SH SEE ALSO
.sp
.LP
\fBgetpflags\fR(2), \fBgetppriv\fR(2), \fBpriv_addset\fR(3C),
\fBpriv_set\fR(3C), \fBpriv_str_to_set\fR(3C), \fBattributes\fR(5),
\fBprivileges\fR(5)