summaryrefslogtreecommitdiff
path: root/usr/src/man/man3perl/Privilege.3perl
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man/man3perl/Privilege.3perl')
-rw-r--r--usr/src/man/man3perl/Privilege.3perl332
1 files changed, 332 insertions, 0 deletions
diff --git a/usr/src/man/man3perl/Privilege.3perl b/usr/src/man/man3perl/Privilege.3perl
new file mode 100644
index 0000000000..454a389a5e
--- /dev/null
+++ b/usr/src/man/man3perl/Privilege.3perl
@@ -0,0 +1,332 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (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]
+.TH Privilege 3PERL "30 Jan 2004" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Privilege \- Perl interface to Privileges
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Privilege qw(:ALL);
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+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.
+.SS "Constants"
+.sp
+.LP
+\fBPRIV_STR_SHORT\fR, \fBPRIV_STR_LIT\fR, \fBPRIV_STR_PORT\fR, \fBPRIV_ON\fR,
+\fBPRIV_OFF\fR, \fBPRIV_SET\fR, \fBPRIV_AWARE\fR, and \fBPRIV_DEBUG\fR.
+.SS "Functions"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetppriv($which)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the process privilege set specified by
+\fB\fR\fB$which\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsetppriv($op, $which, $set)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function modified the privilege set specified by $which in the as
+specified by the \fB$op\fR and \fB$set\fR arguments. If \fB$op\fR is
+\fBPRIV_ON\fR, the privileges in \fB$set\fR are added to the set specified. If
+\fB$op\fR is \fBPRIV_OFF\fR, the privileges in \fB$set\fR are removed from the
+set specified. If \fB$op\fR is \fBPRIV_SET\fR, the specified set is made equal
+to \fB$set\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetpflags($flag)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the value associated with process \fB$flag\fR or
+\fBundef\fR on error. Possible values for \fB$flag\fR are \fBPRIV_AWARE\fR and
+\fBPRIV_DEBUG\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsetppflags($flag, $val)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function sets the process flag \fB$flag\fR to \fB$val\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_fillset()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a new privilege set with all privileges set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_emptyset()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a new empty privilege set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_isemptyset($set)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns whether or not \fB$set\fR is empty.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_isfullset($set)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns whether or not \fB$set\fR is full.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_isequalset($a, $b)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns whether sets \fB$a\fR and \fB$b\fR are equal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_issubset($a, $b)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns whether set \fB$a\fR is a subset of \fB$b\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_ismember($set, $priv)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns whether \fB$priv\fR is a member of \fB$set\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_ineffect($priv)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returned whether \fB$priv\fR is in the process's effective set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_intersect($a, $b)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a new privilege set which is the intersection of \fB$a\fR
+and \fB$b\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_union($a, $b)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a new privilege set which is the union of \fB$a\fR and
+\fB$b\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_inverse($a)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a new privilege set which is the inverse of \fB$a\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_addset($set, $priv)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This functon adds the privilege \fB$priv\fR to \fB$set\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_copyset($a)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a copy of the privilege set \fB$a\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_delset($set, $priv)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function remove the privilege \fB$priv\fR from \fB$set\fR.
+.RE
+
+.SS "Class methods"
+.sp
+.LP
+None.
+.SS "Object methods"
+.sp
+.LP
+None.
+.SS "Exports"
+.sp
+.LP
+By default nothing is exported from this module. The following tags can be used
+to selectively import constants and functions defined in this module:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:SYSCALLS\fR\fR
+.ad
+.RS 14n
+.rt
+\fBgetppriv()\fR, \fBsetppriv()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:LIBCALLS\fR\fR
+.ad
+.RS 14n
+.rt
+\fBpriv_addset()\fR, \fBpriv_copyset()\fR, \fBpriv_delset()\fR,
+\fBpriv_emptyset()\fR, \fBpriv_fillset()\fR, \fBpriv_intersect()\fR,
+\fBpriv_inverse()\fR, \fBpriv_isemptyset()\fR, \fBpriv_isequalset()\fR,
+\fBpriv_isfullset()\fR, \fBpriv_ismember()\fR, \fBpriv_issubset()\fR,
+\fBpriv_gettext()\fR, \fBpriv_union()\fR, \fBpriv_set_to_str()\fR,
+\fBpriv_str_to_set()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:CONSTANTS\fR\fR
+.ad
+.RS 14n
+.rt
+\fBPRIV_STR_SHORT\fR, \fBPRIV_STR_LIT\fR, \fBPRIV_STR_PORT\fR, \fBPRIV_ON\fR,
+\fBPRIV_OFF\fR, \fBPRIV_SET\fR, \fBPRIV_AWARE\fR, \fBPRIV_DEBUG\fR, plus
+constants for all privileges and privilege sets.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:VARIABLES\fR\fR
+.ad
+.RS 14n
+.rt
+\fB%PRIVILEGES\fR, \fB%PRIVSETS\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:ALL\fR\fR
+.ad
+.RS 14n
+.rt
+\fB:SYSCALLS\fR, \fB:LIBCALLS\fR, \fB:CONSTANTS\fR, \fB:VARIABLES\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgetpflags\fR(2), \fBgetppriv\fR(2), \fBpriv_addset\fR(3C),
+\fBpriv_set\fR(3C), \fBpriv_str_to_set\fR(3C), \fBattributes\fR(5),
+\fBprivileges\fR(5)