1#
2# Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
3#
4
5#
6# Sun::Solaris::Privilege documentation.
7#
8
9=head1 NAME
10
11Sun::Solaris::Privilege - Perl interface to Privileges
12
13=head1 SYNOPSIS
14
15 use Sun::Solaris::Privilege qw(:ALL);
16
17This module provides wrappers for the Privilege-related system and
18library calls. Also provided are constants from the various
19Privilege-related headers and dynamically generated constants for all
20the privileges and privilege sets.
21
22=head2 Functions
23
24B<C<getppriv($which)>>
25
26This function returns the process privilege set specified by $which.
27
28B<C<setppriv($op, $which, $set)>>
29
30This function modified the privilege set specified by $which in the
31as specified by the $op and $set arguments.  If $op is PRIV_ON the
32privileges in $set are added to the set specified; if $op is PRIV_OFF,
33the privileges in $set are removed from the set specified; if $op
34is PRIV_SET, the specified set is made equal to $set.
35
36B<C<getpflags($flag)>>
37
38Returns the value associated with process $flag or undef on error.
39Possible values for $flag are PRIV_AWARE and PRIV_DEBUG.
40
41B<C<setppflags($flag, $val)>>
42
43Sets the process flag $flag to $val.
44
45B<C<priv_fillset()>>
46
47This returns a new privilege set with all privileges set.
48
49B<C<priv_emptyset()>>
50
51This returns a new empty privilege set.
52
53B<C<priv_isemptyset($set)>>
54
55This function returns whether $set is empty or not.
56
57B<C<priv_isfullset($set)>>
58
59This function returns whether $set is full or not.
60
61B<C<priv_isequalset($a, $b)>>
62
63This function returns whether sets $a and $b are equal.
64
65B<C<priv_issubset($a, $b)>>
66
67This function returns whether set $a is a subset of $b.
68
69B<C<priv_ismember($set, $priv)>>
70
71This function returns whether $priv is a member of $set.
72
73B<C<priv_ineffect($priv)>>
74
75This function returned whether $priv is in the process' effective set.
76
77B<C<priv_intersect($a, $b)>>
78
79This function returns a new privilege set which is the intersection of $a
80and $b
81
82B<C<priv_union($a, $b)>>
83
84This function returns a new privilege set which is the union of $a
85and $b
86
87B<C<priv_inverse($a)>>
88
89This function returns a new privilege set which is the inverse of $a.
90
91B<C<priv_addset($set, $priv)>>
92
93This functon adds the privilege $priv to $set.
94
95B<C<priv_copyset($a)>>
96
97This function returns a copy of the privilege set $a.
98
99B<C<priv_delset($set, $priv)>>
100
101This function remove the privilege $priv from $set.
102
103=head2 Class methods
104
105None.
106
107=head2 Object methods
108
109None.
110
111=head2 Exports
112
113By default nothing is exported from this module. The following tags can be
114used to selectively import constants and functions defined in this module:
115
116 :SYSCALLS    getppriv(), setppriv()
117
118 :LIBCALLS    priv_addset(), priv_copyset(), priv_delset(),
119	      priv_emptyset(), priv_fillset(), priv_intersect(),
120	      priv_inverse(), priv_isemptyset(), priv_isequalset(),
121	      priv_isfullset(), priv_ismember(), priv_issubset(),
122	      priv_gettext(), priv_union(), priv_set_to_str(),
123	      priv_str_to_set()
124
125 :CONSTANTS   PRIV_STR_SHORT PRIV_STR_LIT PRIV_STR_PORT PRIV_ON PRIV_OFF
126	      PRIV_SET PRIV_ALLSETS PRIV_AWARE PRIV_DEBUG
127	      plus constant for all privileges and privilege sets.
128
129 :VARIABLES   %PRIVILEGES, %PRIVSETS
130
131 :ALL         :SYSCALLS, :LIBCALLS, :CONSTANTS and :VARIABLES
132
133=head1 ATTRIBUTES
134
135See C<attributes(5)> for descriptions of the following attributes:
136
137  ___________________________________________________________
138 |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
139 |_____________________________|_____________________________|
140 | Availability                | CPAN (http://www.cpan.org)  |
141 |_____________________________|_____________________________|
142 | Interface Stability         | Evolving                    |
143 |_____________________________|_____________________________|
144
145=head1 SEE ALSO
146
147C<getpflags(2)>, C<getppriv(2)>, C<priv_addset(3C)>, C<priv_str_to_set(3C)>,
148C<priv_set(3C)>, C<privileges(5)>, C<attributes(5)>
149