7759 Perl modules update
[unleashed-userland.git] / components / perl / sun_solaris / src / Sun / Solaris / Ucred / pod / Ucred.pod
blob60baaf9cf015586b7f70ef7eee1443eb1337292a
2 # Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
6 # Sun::Solaris::Ucred documentation.
7
9 =head1 NAME
11 Sun::Solaris::Ucred - Perl interface to User Credentials
13 =head1 SYNOPSIS
15  use Sun::Solaris::Ucred qw(:ALL);
17 This module provides wrappers for the Ucred-related system and
18 library calls.
20 =head2 Functions
22 B<C<ucred_get($pid)>>
24 This function returns the credential of the process specified by $pid,
25 if the process exists and the calling process is permitted to obtain
26 the credentials of that process.
28 B<C<getpeerucred($fd)>>
30 If $fd is a connected connection oriented TLI endpoint, a connected
31 SOCK_STREAM or SOCK_SEQPKT socket, getpeerucred will return the user
32 credential of the peer at the time the connection was established,
33 if availble.
35 B<C<ucred_geteuid($ucred)>>
37 This function returns the effective uid of a user credential, if available.
39 B<C<ucred_getruid($ucred)>>
41 This function returns the real uid of a user credential, if available.
43 B<C<ucred_getsuid($ucred)>>
45 This function returns the saved uid of a user credential, if available.
47 B<C<ucred_getegid($ucred)>>
49 This function returns the effective group of a user credential, if available.
51 B<C<ucred_getrgid($ucred)>>
53 This function returns the real group of a user credential, if available.
55 B<C<ucred_getsgid($ucred)>>
57 This function returns the saved group of a user credential, if available.
59 B<C<ucred_getgroups($ucred)>>
61 This function returns the list of supplemental groups of a user
62 credential, if available.  An array of groups is returned in ARRAY
63 context; the number of groups is returned in SCALAR context.
65 B<C<ucred_getprivset($ucred, $which)>>
67 This function returns the privilege set specified by $which of a user
68 credential, if available.
70 B<C<ucred_getpflags($ucred, $flags)>>
72 This function returns the value of a specific process flag of a user
73 credential, if available.
75 B<C<ucred_getpid($ucred)>>
77 This function returns the process id of a user credential, if available.
79 B<C<ucred_getzoneid($ucred)>>
81 This function returns the zone id of a user credential, if available.
83 B<C<ucred_getprojid($ucred)>>
85 This function returns the project id of a user credential, if available.
87 =head2 Class methods
89 None.
91 =head2 Object methods
93 None.
95 =head2 Exports
97 By default nothing is exported from this module. The following tags can be
98 used to selectively import constants and functions defined in this module:
100  :SYSCALLS    ucred_get(), getpeerucred()
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()
107  :CONSTANTS
109  :VARIABLES   %PRIVILEGES, %PRIVSETS
111  :ALL         :SYSCALLS, :LIBCALLS, and :CONSTANTS
113 =head1 ATTRIBUTES
115 See C<attributes(5)> for descriptions of the following attributes:
117   ___________________________________________________________
118  |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
119  |_____________________________|_____________________________|
120  | Availability                | CPAN (http://www.cpan.org)  |
121  |_____________________________|_____________________________|
122  | Interface Stability         | Evolving                    |
123  |_____________________________|_____________________________|
125 =head1 SEE ALSO
127 C<getpeerucred(2)>, C<ucred_get(3C)>, C<attributes(5)>