summaryrefslogtreecommitdiff
path: root/usr/src/man/man3perl/Ucred.3perl
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man/man3perl/Ucred.3perl')
-rw-r--r--usr/src/man/man3perl/Ucred.3perl256
1 files changed, 256 insertions, 0 deletions
diff --git a/usr/src/man/man3perl/Ucred.3perl b/usr/src/man/man3perl/Ucred.3perl
new file mode 100644
index 0000000000..f8b94a481e
--- /dev/null
+++ b/usr/src/man/man3perl/Ucred.3perl
@@ -0,0 +1,256 @@
+'\" 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 Ucred 3PERL "30 Jan 2004" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Ucred \- Perl interface to User Credentials
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Ucred qw(:ALL);
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+This module provides wrappers for the Ucred-related system and library calls.
+.SS "Constants"
+.sp
+.LP
+None.
+.SS "Functions"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_get($pid)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the credential of the process specified by \fB$pid\fR if
+the process exists and the calling process is permitted to obtain the
+credentials of that process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetpeerucred($fd)\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fB$fd\fR is a connected connection-oriented TLI endpoint, a connected
+\fBSOCK_STREAM\fR, or a \fBSOCK_SEQPKT\fR socket, \fBgetpeerucred()\fR returns
+the user credential of the peer at the time the connection was established, if
+availble.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_geteuid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the effective uid of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getruid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the real uid of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getsuid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the saved uid of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getegid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the effective group of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getrgid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the real group of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getsgid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the saved group of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getgroups($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the list of supplemental groups of a user credential, if
+available.An array of groups is returned in \fBARRAY\fR context; the number of
+groups is returned in \fBSCALAR\fR context.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getprivset($ucred, $which)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the privilege set specified by \fB$which\fR of a user
+credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getpflags($ucred, $flags)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the value of a specific process flag of a user
+credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getpid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the process ID of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getprojid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the project ID of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getzoneid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the zone ID of a user credential, if available.
+.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 13n
+.rt
+\fBucred_get()\fR, \fBgetpeerucred()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:LIBCALLS\fR\fR
+.ad
+.RS 13n
+.rt
+\fBucred_geteuid()\fR, \fBucred_getruid()\fR, \fBucred_getsuid()\fR,
+\fBucred_getegid()\fR, \fBucred_getrgid()\fR, \fBucred_getsgid()\fR,
+\fBucred_getgroups()\fR, \fBucred_getprivset()\fR, \fBucred_getpflags()\fR,
+\fBucred_getpid()\fR, \fBucred_getzone()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:ALL\fR\fR
+.ad
+.RS 13n
+.rt
+\fB:SYSCALLS()\fR, \fB:LIBCALLS()\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
+\fBgetpeerucred\fR(3C), \fBucred_get\fR(3C), \fBattributes\fR(5)