1Privilege(3PERL) Perl Library Functions Privilege(3PERL)
2
3
4
6 Privilege - Perl interface to Privileges
7
9 use Sun::Solaris::Privilege qw(:ALL);
10
11
13 This module provides wrappers for the Privilege-related system and
14 library calls. Also provided are constants from the various Privilege-
15 related headers and dynamically-generated constants for all the privi‐
16 leges and privilege sets.
17
18 Constants
19 PRIV_STR_SHORT, PRIV_STR_LIT, PRIV_STR_PORT, PRIV_ON, PRIV_OFF,
20 PRIV_SET, PRIV_AWARE, and PRIV_DEBUG.
21
22 Functions
23 getppriv($which)
24
25 This function returns the process privilege set specified by
26 $which.
27
28
29 setppriv($op, $which, $set)
30
31 This function modified the privilege set specified by $which in the
32 as specified by the $op and $set arguments. If $op is PRIV_ON, the
33 privileges in $set are added to the set specified. If $op is
34 PRIV_OFF, the privileges in $set are removed from the set speci‐
35 fied. If $op is PRIV_SET, the specified set is made equal to $set.
36
37
38 getpflags($flag)
39
40 This function returns the value associated with process $flag or
41 undef on error. Possible values for $flag are PRIV_AWARE and
42 PRIV_DEBUG.
43
44
45 setppflags($flag, $val)
46
47 This function sets the process flag $flag to $val.
48
49
50 priv_fillset()
51
52 This function returns a new privilege set with all privileges set.
53
54
55 priv_emptyset()
56
57 This function returns a new empty privilege set.
58
59
60 priv_isemptyset($set)
61
62 This function returns whether or not $set is empty.
63
64
65 priv_isfullset($set)
66
67 This function returns whether or not $set is full.
68
69
70 priv_isequalset($a, $b)
71
72 This function returns whether sets $a and $b are equal.
73
74
75 priv_issubset($a, $b)
76
77 This function returns whether set $a is a subset of $b.
78
79
80 priv_ismember($set, $priv)
81
82 This function returns whether $priv is a member of $set.
83
84
85 priv_ineffect($priv)
86
87 This function returned whether $priv is in the process's effective
88 set.
89
90
91 priv_intersect($a, $b)
92
93 This function returns a new privilege set which is the intersection
94 of $a and $b.
95
96
97 priv_union($a, $b)
98
99 This function returns a new privilege set which is the union of $a
100 and $b.
101
102
103 priv_inverse($a)
104
105 This function returns a new privilege set which is the inverse of
106 $a.
107
108
109 priv_addset($set, $priv)
110
111 This functon adds the privilege $priv to $set.
112
113
114 priv_copyset($a)
115
116 This function returns a copy of the privilege set $a.
117
118
119 priv_delset($set, $priv)
120
121 This function remove the privilege $priv from $set.
122
123
124 Class methods
125 None.
126
127 Object methods
128 None.
129
130 Exports
131 By default nothing is exported from this module. The following tags can
132 be used to selectively import constants and functions defined in this
133 module:
134
135 :SYSCALLS getppriv(), setppriv()
136
137
138 :LIBCALLS priv_addset(), priv_copyset(), priv_delset(), priv_empty‐
139 set(), priv_fillset(), priv_intersect(), priv_inverse(),
140 priv_isemptyset(), priv_isequalset(), priv_isfullset(),
141 priv_ismember(), priv_issubset(), priv_gettext(),
142 priv_union(), priv_set_to_str(), priv_str_to_set()
143
144
145 :CONSTANTS PRIV_STR_SHORT, PRIV_STR_LIT, PRIV_STR_PORT, PRIV_ON,
146 PRIV_OFF, PRIV_SET, PRIV_AWARE, PRIV_DEBUG, plus con‐
147 stants for all privileges and privilege sets.
148
149
150 :VARIABLES %PRIVILEGES, %PRIVSETS
151
152
153 :ALL :SYSCALLS, :LIBCALLS, :CONSTANTS, :VARIABLES
154
155
157 See attributes(5) for descriptions of the following attributes:
158
159
160
161
162 ┌─────────────────────────────┬─────────────────────────────┐
163 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
164 ├─────────────────────────────┼─────────────────────────────┤
165 │Availability │SUNWpl5u │
166 ├─────────────────────────────┼─────────────────────────────┤
167 │Interface Stability │Evolving │
168 └─────────────────────────────┴─────────────────────────────┘
169
171 getpflags(2), getppriv(2), priv_addset(3C), priv_set(3C),
172 priv_str_to_set(3C), attributes(5), privileges(5)
173
174
175
176SunOS 5.11 30 Jan 2004 Privilege(3PERL)