xref: /onnv-gate/usr/src/cmd/perl/contrib/Sun/Solaris/Ucred/pod/Ucred.pod (revision 12388:1bc8d55b0dfd)
1#
2# Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
3#
4
5#
6# Sun::Solaris::Ucred documentation.
7#
8
9=head1 NAME
10
11Sun::Solaris::Ucred - Perl interface to User Credentials
12
13=head1 SYNOPSIS
14
15 use Sun::Solaris::Ucred qw(:ALL);
16
17This module provides wrappers for the Ucred-related system and
18library calls.
19
20=head2 Functions
21
22B<C<ucred_get($pid)>>
23
24This function returns the credential of the process specified by $pid,
25if the process exists and the calling process is permitted to obtain
26the credentials of that process.
27
28B<C<getpeerucred($fd)>>
29
30If $fd is a connected connection oriented TLI endpoint, a connected
31SOCK_STREAM or SOCK_SEQPKT socket, getpeerucred will return the user
32credential of the peer at the time the connection was established,
33if availble.
34
35B<C<ucred_geteuid($ucred)>>
36
37This function returns the effective uid of a user credential, if available.
38
39B<C<ucred_getruid($ucred)>>
40
41This function returns the real uid of a user credential, if available.
42
43B<C<ucred_getsuid($ucred)>>
44
45This function returns the saved uid of a user credential, if available.
46
47B<C<ucred_getegid($ucred)>>
48
49This function returns the effective group of a user credential, if available.
50
51B<C<ucred_getrgid($ucred)>>
52
53This function returns the real group of a user credential, if available.
54
55B<C<ucred_getsgid($ucred)>>
56
57This function returns the saved group of a user credential, if available.
58
59B<C<ucred_getgroups($ucred)>>
60
61This function returns the list of supplemental groups of a user
62credential, if available.  An array of groups is returned in ARRAY
63context; the number of groups is returned in SCALAR context.
64
65B<C<ucred_getprivset($ucred, $which)>>
66
67This function returns the privilege set specified by $which of a user
68credential, if available.
69
70B<C<ucred_getpflags($ucred, $flags)>>
71
72This function returns the value of a specific process flag of a user
73credential, if available.
74
75B<C<ucred_getpid($ucred)>>
76
77This function returns the process id of a user credential, if available.
78
79B<C<ucred_getzoneid($ucred)>>
80
81This function returns the zone id of a user credential, if available.
82
83B<C<ucred_getprojid($ucred)>>
84
85This function returns the project id of a user credential, if available.
86
87=head2 Class methods
88
89None.
90
91=head2 Object methods
92
93None.
94
95=head2 Exports
96
97By default nothing is exported from this module. The following tags can be
98used to selectively import constants and functions defined in this module:
99
100 :SYSCALLS    ucred_get(), getpeerucred()
101
102 :LIBCALLS    ucred_geteuid(), ucred_getruid(), ucred_getsuid(),
103	      ucred_getegid(), ucred_getrgid(), ucred_getsgid(),
104	      ucred_getgroups(), ucred_getprivset(), ucred_getpflags(),
105	      ucred_getpid(), ucred_getzoneid(), ucred_getprojid()
106
107 :CONSTANTS
108
109 :VARIABLES   %PRIVILEGES, %PRIVSETS
110
111 :ALL         :SYSCALLS, :LIBCALLS, and :CONSTANTS
112
113=head1 ATTRIBUTES
114
115See C<attributes(5)> for descriptions of the following attributes:
116
117  ___________________________________________________________
118 |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
119 |_____________________________|_____________________________|
120 | Availability                | CPAN (http://www.cpan.org)  |
121 |_____________________________|_____________________________|
122 | Interface Stability         | Evolving                    |
123 |_____________________________|_____________________________|
124
125=head1 SEE ALSO
126
127C<getpeerucred(2)>, C<ucred_get(3C)>, C<attributes(5)>
128