1Ucred(3PERL) Perl Library Functions Ucred(3PERL)
2
3
4
6 Ucred - Perl interface to User Credentials
7
9 use Sun::Solaris::Ucred qw(:ALL);
10
11
13 This module provides wrappers for the Ucred-related system and library
14 calls.
15
16 Constants
17 None.
18
19 Functions
20 ucred_get($pid)
21
22 This function returns the credential of the process specified by
23 $pid if the process exists and the calling process is permitted to
24 obtain the credentials of that process.
25
26
27 getpeerucred($fd)
28
29 If $fd is a connected connection-oriented TLI endpoint, a connected
30 SOCK_STREAM, or a SOCK_SEQPKT socket, getpeerucred() returns the
31 user credential of the peer at the time the connection was estab‐
32 lished, if availble.
33
34
35 ucred_geteuid($ucred)
36
37 This function returns the effective uid of a user credential, if
38 available.
39
40
41 ucred_getruid($ucred)
42
43 This function returns the real uid of a user credential, if avail‐
44 able.
45
46
47 ucred_getsuid($ucred)
48
49 This function returns the saved uid of a user credential, if avail‐
50 able.
51
52
53 ucred_getegid($ucred)
54
55 This function returns the effective group of a user credential, if
56 available.
57
58
59 ucred_getrgid($ucred)
60
61 This function returns the real group of a user credential, if
62 available.
63
64
65 ucred_getsgid($ucred)
66
67 This function returns the saved group of a user credential, if
68 available.
69
70
71 ucred_getgroups($ucred)
72
73 This function returns the list of supplemental groups of a user
74 credential, if available.An array of groups is returned in ARRAY
75 context; the number of groups is returned in SCALAR context.
76
77
78 ucred_getprivset($ucred, $which)
79
80 This function returns the privilege set specified by $which of a
81 user credential, if available.
82
83
84 ucred_getpflags($ucred, $flags)
85
86 This function returns the value of a specific process flag of a
87 user credential, if available.
88
89
90 ucred_getpid($ucred)
91
92 This function returns the process ID of a user credential, if
93 available.
94
95
96 ucred_getprojid($ucred)
97
98 This function returns the project ID of a user credential, if
99 available.
100
101
102 ucred_getzoneid($ucred)
103
104 This function returns the zone ID of a user credential, if avail‐
105 able.
106
107
108 Class methods
109 None.
110
111 Object methods
112 None.
113
114 Exports
115 By default nothing is exported from this module. The following tags can
116 be used to selectively import constants and functions defined in this
117 module:
118
119 :SYSCALLS ucred_get(), getpeerucred()
120
121
122 :LIBCALLS ucred_geteuid(), ucred_getruid(), ucred_getsuid(),
123 ucred_getegid(), ucred_getrgid(), ucred_getsgid(),
124 ucred_getgroups(), ucred_getprivset(), ucred_getpflags(),
125 ucred_getpid(), ucred_getzone()
126
127
128 :ALL :SYSCALLS(), :LIBCALLS()
129
130
132 See attributes(5) for descriptions of the following attributes:
133
134
135
136
137 ┌─────────────────────────────┬─────────────────────────────┐
138 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
139 ├─────────────────────────────┼─────────────────────────────┤
140 │Availability │SUNWpl5u │
141 ├─────────────────────────────┼─────────────────────────────┤
142 │Interface Stability │Evolving │
143 └─────────────────────────────┴─────────────────────────────┘
144
146 getpeerucred(3C), ucred_get(3C), attributes(5)
147
148
149
150SunOS 5.11 30 Jan 2004 Ucred(3PERL)