10Sstevel@tonic-gate#
2*12388SJohn.Sonnenschein@Sun.COM# Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
30Sstevel@tonic-gate#
4*12388SJohn.Sonnenschein@Sun.COM
50Sstevel@tonic-gate#
60Sstevel@tonic-gate# Sun::Solaris::Privilege documentation.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate
90Sstevel@tonic-gate=head1 NAME
100Sstevel@tonic-gate
110Sstevel@tonic-gateSun::Solaris::Privilege - Perl interface to Privileges
120Sstevel@tonic-gate
130Sstevel@tonic-gate=head1 SYNOPSIS
140Sstevel@tonic-gate
150Sstevel@tonic-gate use Sun::Solaris::Privilege qw(:ALL);
160Sstevel@tonic-gate
170Sstevel@tonic-gateThis module provides wrappers for the Privilege-related system and
180Sstevel@tonic-gatelibrary calls. Also provided are constants from the various
190Sstevel@tonic-gatePrivilege-related headers and dynamically generated constants for all
200Sstevel@tonic-gatethe privileges and privilege sets.
210Sstevel@tonic-gate
220Sstevel@tonic-gate=head2 Functions
230Sstevel@tonic-gate
240Sstevel@tonic-gateB<C<getppriv($which)>>
250Sstevel@tonic-gate
260Sstevel@tonic-gateThis function returns the process privilege set specified by $which.
270Sstevel@tonic-gate
280Sstevel@tonic-gateB<C<setppriv($op, $which, $set)>>
290Sstevel@tonic-gate
300Sstevel@tonic-gateThis function modified the privilege set specified by $which in the
310Sstevel@tonic-gateas specified by the $op and $set arguments.  If $op is PRIV_ON the
320Sstevel@tonic-gateprivileges in $set are added to the set specified; if $op is PRIV_OFF,
330Sstevel@tonic-gatethe privileges in $set are removed from the set specified; if $op
340Sstevel@tonic-gateis PRIV_SET, the specified set is made equal to $set.
350Sstevel@tonic-gate
360Sstevel@tonic-gateB<C<getpflags($flag)>>
370Sstevel@tonic-gate
380Sstevel@tonic-gateReturns the value associated with process $flag or undef on error.
390Sstevel@tonic-gatePossible values for $flag are PRIV_AWARE and PRIV_DEBUG.
400Sstevel@tonic-gate
410Sstevel@tonic-gateB<C<setppflags($flag, $val)>>
420Sstevel@tonic-gate
430Sstevel@tonic-gateSets the process flag $flag to $val.
440Sstevel@tonic-gate
450Sstevel@tonic-gateB<C<priv_fillset()>>
460Sstevel@tonic-gate
470Sstevel@tonic-gateThis returns a new privilege set with all privileges set.
480Sstevel@tonic-gate
490Sstevel@tonic-gateB<C<priv_emptyset()>>
500Sstevel@tonic-gate
510Sstevel@tonic-gateThis returns a new empty privilege set.
520Sstevel@tonic-gate
530Sstevel@tonic-gateB<C<priv_isemptyset($set)>>
540Sstevel@tonic-gate
550Sstevel@tonic-gateThis function returns whether $set is empty or not.
560Sstevel@tonic-gate
570Sstevel@tonic-gateB<C<priv_isfullset($set)>>
580Sstevel@tonic-gate
590Sstevel@tonic-gateThis function returns whether $set is full or not.
600Sstevel@tonic-gate
610Sstevel@tonic-gateB<C<priv_isequalset($a, $b)>>
620Sstevel@tonic-gate
630Sstevel@tonic-gateThis function returns whether sets $a and $b are equal.
640Sstevel@tonic-gate
650Sstevel@tonic-gateB<C<priv_issubset($a, $b)>>
660Sstevel@tonic-gate
670Sstevel@tonic-gateThis function returns whether set $a is a subset of $b.
680Sstevel@tonic-gate
690Sstevel@tonic-gateB<C<priv_ismember($set, $priv)>>
700Sstevel@tonic-gate
710Sstevel@tonic-gateThis function returns whether $priv is a member of $set.
720Sstevel@tonic-gate
730Sstevel@tonic-gateB<C<priv_ineffect($priv)>>
740Sstevel@tonic-gate
750Sstevel@tonic-gateThis function returned whether $priv is in the process' effective set.
760Sstevel@tonic-gate
770Sstevel@tonic-gateB<C<priv_intersect($a, $b)>>
780Sstevel@tonic-gate
790Sstevel@tonic-gateThis function returns a new privilege set which is the intersection of $a
800Sstevel@tonic-gateand $b
810Sstevel@tonic-gate
820Sstevel@tonic-gateB<C<priv_union($a, $b)>>
830Sstevel@tonic-gate
840Sstevel@tonic-gateThis function returns a new privilege set which is the union of $a
850Sstevel@tonic-gateand $b
860Sstevel@tonic-gate
870Sstevel@tonic-gateB<C<priv_inverse($a)>>
880Sstevel@tonic-gate
890Sstevel@tonic-gateThis function returns a new privilege set which is the inverse of $a.
900Sstevel@tonic-gate
910Sstevel@tonic-gateB<C<priv_addset($set, $priv)>>
920Sstevel@tonic-gate
930Sstevel@tonic-gateThis functon adds the privilege $priv to $set.
940Sstevel@tonic-gate
950Sstevel@tonic-gateB<C<priv_copyset($a)>>
960Sstevel@tonic-gate
970Sstevel@tonic-gateThis function returns a copy of the privilege set $a.
980Sstevel@tonic-gate
990Sstevel@tonic-gateB<C<priv_delset($set, $priv)>>
1000Sstevel@tonic-gate
1010Sstevel@tonic-gateThis function remove the privilege $priv from $set.
1020Sstevel@tonic-gate
1030Sstevel@tonic-gate=head2 Class methods
1040Sstevel@tonic-gate
1050Sstevel@tonic-gateNone.
1060Sstevel@tonic-gate
1070Sstevel@tonic-gate=head2 Object methods
1080Sstevel@tonic-gate
1090Sstevel@tonic-gateNone.
1100Sstevel@tonic-gate
1110Sstevel@tonic-gate=head2 Exports
1120Sstevel@tonic-gate
1130Sstevel@tonic-gateBy default nothing is exported from this module. The following tags can be
1140Sstevel@tonic-gateused to selectively import constants and functions defined in this module:
1150Sstevel@tonic-gate
1160Sstevel@tonic-gate :SYSCALLS    getppriv(), setppriv()
1170Sstevel@tonic-gate
1180Sstevel@tonic-gate :LIBCALLS    priv_addset(), priv_copyset(), priv_delset(),
1190Sstevel@tonic-gate	      priv_emptyset(), priv_fillset(), priv_intersect(),
1200Sstevel@tonic-gate	      priv_inverse(), priv_isemptyset(), priv_isequalset(),
1210Sstevel@tonic-gate	      priv_isfullset(), priv_ismember(), priv_issubset(),
1220Sstevel@tonic-gate	      priv_gettext(), priv_union(), priv_set_to_str(),
1230Sstevel@tonic-gate	      priv_str_to_set()
1240Sstevel@tonic-gate
1250Sstevel@tonic-gate :CONSTANTS   PRIV_STR_SHORT PRIV_STR_LIT PRIV_STR_PORT PRIV_ON PRIV_OFF
1260Sstevel@tonic-gate	      PRIV_SET PRIV_ALLSETS PRIV_AWARE PRIV_DEBUG
1270Sstevel@tonic-gate	      plus constant for all privileges and privilege sets.
1280Sstevel@tonic-gate
1290Sstevel@tonic-gate :VARIABLES   %PRIVILEGES, %PRIVSETS
1300Sstevel@tonic-gate
1310Sstevel@tonic-gate :ALL         :SYSCALLS, :LIBCALLS, :CONSTANTS and :VARIABLES
1320Sstevel@tonic-gate
1330Sstevel@tonic-gate=head1 ATTRIBUTES
1340Sstevel@tonic-gate
1350Sstevel@tonic-gateSee C<attributes(5)> for descriptions of the following attributes:
1360Sstevel@tonic-gate
1370Sstevel@tonic-gate  ___________________________________________________________
1380Sstevel@tonic-gate |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
1390Sstevel@tonic-gate |_____________________________|_____________________________|
1400Sstevel@tonic-gate | Availability                | CPAN (http://www.cpan.org)  |
1410Sstevel@tonic-gate |_____________________________|_____________________________|
1420Sstevel@tonic-gate | Interface Stability         | Evolving                    |
1430Sstevel@tonic-gate |_____________________________|_____________________________|
1440Sstevel@tonic-gate
1450Sstevel@tonic-gate=head1 SEE ALSO
1460Sstevel@tonic-gate
1470Sstevel@tonic-gateC<getpflags(2)>, C<getppriv(2)>, C<priv_addset(3C)>, C<priv_str_to_set(3C)>,
1480Sstevel@tonic-gateC<priv_set(3C)>, C<privileges(5)>, C<attributes(5)>
149