Privilege.pod revision 7c478bd95313f5f23a4c958a745db2134aa03244
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (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]
#
# CDDL HEADER END
#
#ident "%Z%%M% %I% %E% SMI"
#
# Sun::Solaris::Privilege documentation.
#
=head1 NAME
Sun::Solaris::Privilege - Perl interface to Privileges
=head1 SYNOPSIS
use Sun::Solaris::Privilege qw(:ALL);
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.
=head2 Functions
B<C<getppriv($which)>>
This function returns the process privilege set specified by $which.
B<C<setppriv($op, $which, $set)>>
This function modified the privilege set specified by $which in the
as specified by the $op and $set arguments. If $op is PRIV_ON the
privileges in $set are added to the set specified; if $op is PRIV_OFF,
the privileges in $set are removed from the set specified; if $op
is PRIV_SET, the specified set is made equal to $set.
B<C<getpflags($flag)>>
Returns the value associated with process $flag or undef on error.
Possible values for $flag are PRIV_AWARE and PRIV_DEBUG.
B<C<setppflags($flag, $val)>>
Sets the process flag $flag to $val.
B<C<priv_fillset()>>
This returns a new privilege set with all privileges set.
B<C<priv_emptyset()>>
This returns a new empty privilege set.
B<C<priv_isemptyset($set)>>
This function returns whether $set is empty or not.
B<C<priv_isfullset($set)>>
This function returns whether $set is full or not.
B<C<priv_isequalset($a, $b)>>
This function returns whether sets $a and $b are equal.
B<C<priv_issubset($a, $b)>>
This function returns whether set $a is a subset of $b.
B<C<priv_ismember($set, $priv)>>
This function returns whether $priv is a member of $set.
B<C<priv_ineffect($priv)>>
This function returned whether $priv is in the process' effective set.
B<C<priv_intersect($a, $b)>>
This function returns a new privilege set which is the intersection of $a
and $b
B<C<priv_union($a, $b)>>
This function returns a new privilege set which is the union of $a
and $b
B<C<priv_inverse($a)>>
This function returns a new privilege set which is the inverse of $a.
B<C<priv_addset($set, $priv)>>
This functon adds the privilege $priv to $set.
B<C<priv_copyset($a)>>
This function returns a copy of the privilege set $a.
B<C<priv_delset($set, $priv)>>
This function remove the privilege $priv from $set.
=head2 Class methods
None.
=head2 Object methods
None.
=head2 Exports
By default nothing is exported from this module. The following tags can be
used to selectively import constants and functions defined in this module:
:SYSCALLS getppriv(), setppriv()
:LIBCALLS priv_addset(), priv_copyset(), priv_delset(),
priv_emptyset(), priv_fillset(), priv_intersect(),
priv_inverse(), priv_isemptyset(), priv_isequalset(),
priv_isfullset(), priv_ismember(), priv_issubset(),
priv_gettext(), priv_union(), priv_set_to_str(),
priv_str_to_set()
:CONSTANTS PRIV_STR_SHORT PRIV_STR_LIT PRIV_STR_PORT PRIV_ON PRIV_OFF
PRIV_SET PRIV_ALLSETS PRIV_AWARE PRIV_DEBUG
plus constant for all privileges and privilege sets.
:VARIABLES %PRIVILEGES, %PRIVSETS
:ALL :SYSCALLS, :LIBCALLS, :CONSTANTS and :VARIABLES
=head1 ATTRIBUTES
See C<attributes(5)> for descriptions of the following attributes:
___________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | CPAN (http://www.cpan.org) |
|_____________________________|_____________________________|
| Interface Stability | Evolving |
|_____________________________|_____________________________|
=head1 SEE ALSO
C<getpflags(2)>, C<getppriv(2)>, C<priv_addset(3C)>, C<priv_str_to_set(3C)>,
C<priv_set(3C)>, C<privileges(5)>, C<attributes(5)>