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 11 Sun::Solaris::Privilege - Perl interface to Privileges 12 13 =head1 SYNOPSIS 14 15 use Sun::Solaris::Privilege qw(:ALL); 16 17 This module provides wrappers for the Privilege-related system and 18 library calls. Also provided are constants from the various 19 Privilege-related headers and dynamically generated constants for all 20 the privileges and privilege sets. 21 22 =head2 Functions 23 24 B<C<getppriv($which)>> 25 26 This function returns the process privilege set specified by $which. 27 28 B<C<setppriv($op, $which, $set)>> 29 30 This function modified the privilege set specified by $which in the 31 as specified by the $op and $set arguments. If $op is PRIV_ON the 32 privileges in $set are added to the set specified; if $op is PRIV_OFF, 33 the privileges in $set are removed from the set specified; if $op 34 is PRIV_SET, the specified set is made equal to $set. 35 36 B<C<getpflags($flag)>> 37 38 Returns the value associated with process $flag or undef on error. 39 Possible values for $flag are PRIV_AWARE and PRIV_DEBUG. 40 41 B<C<setppflags($flag, $val)>> 42 43 Sets the process flag $flag to $val. 44 45 B<C<priv_fillset()>> 46 47 This returns a new privilege set with all privileges set. 48 49 B<C<priv_emptyset()>> 50 51 This returns a new empty privilege set. 52 53 B<C<priv_isemptyset($set)>> 54 55 This function returns whether $set is empty or not. 56 57 B<C<priv_isfullset($set)>> 58 59 This function returns whether $set is full or not. 60 61 B<C<priv_isequalset($a, $b)>> 62 63 This function returns whether sets $a and $b are equal. 64 65 B<C<priv_issubset($a, $b)>> 66 67 This function returns whether set $a is a subset of $b. 68 69 B<C<priv_ismember($set, $priv)>> 70 71 This function returns whether $priv is a member of $set. 72 73 B<C<priv_ineffect($priv)>> 74 75 This function returned whether $priv is in the process' effective set. 76 77 B<C<priv_intersect($a, $b)>> 78 79 This function returns a new privilege set which is the intersection of $a 80 and $b 81 82 B<C<priv_union($a, $b)>> 83 84 This function returns a new privilege set which is the union of $a 85 and $b 86 87 B<C<priv_inverse($a)>> 88 89 This function returns a new privilege set which is the inverse of $a. 90 91 B<C<priv_addset($set, $priv)>> 92 93 This functon adds the privilege $priv to $set. 94 95 B<C<priv_copyset($a)>> 96 97 This function returns a copy of the privilege set $a. 98 99 B<C<priv_delset($set, $priv)>> 100 101 This function remove the privilege $priv from $set. 102 103 =head2 Class methods 104 105 None. 106 107 =head2 Object methods 108 109 None. 110 111 =head2 Exports 112 113 By default nothing is exported from this module. The following tags can be 114 used 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 135 See 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 147 C<getpflags(2)>, C<getppriv(2)>, C<priv_addset(3C)>, C<priv_str_to_set(3C)>, 148 C<priv_set(3C)>, C<privileges(5)>, C<attributes(5)>