Merge commit '45681b8b0e59cad83c1547d78e25d4b7f218d635'
[unleashed.git] / share / man / man3c / door_cred.3c
blobb560bb80dc09c39c803bd053df1ee2e0edf577ee
1 '\" te
2 .\" Copyright (c) 2005, Sun Microsystems, Inc.  All Rights Reserved.
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH DOOR_CRED 3C "Mar 22, 2005"
7 .SH NAME
8 door_cred \- return credential information associated with the client
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBcc\fR \fB-mt\fR [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR... ]
13 #include <door.h>
15 \fBint\fR \fBdoor_cred\fR(\fBdoor_cred_t *\fR\fIinfo\fR);
16 .fi
18 .SH DESCRIPTION
19 .LP
20 The \fBdoor_cred()\fR function returns credential information associated with
21 the client (if any) of the current door invocation.
22 .sp
23 .LP
24 The contents of the \fIinfo\fR argument include the following fields:
25 .sp
26 .in +2
27 .nf
28 uid_t   dc_euid;        /* Effective uid of client */
29 gid_t   dc_egid;        /* Effective gid of client */
30 uid_t   dc_ruid;        /* Real uid of client */
31 gid_t   dc_rgid;        /* Real gid of client */
32 pid_t   dc_pid;         /* pid of client */
33 .fi
34 .in -2
36 .sp
37 .LP
38 The credential information associated with the client refers to the information
39 from the immediate caller; not necessarily from the first thread in a chain of
40 door calls.
41 .SH RETURN VALUES
42 .LP
43 Upon successful completion, \fBdoor_cred()\fR returns \fB0\fR. Otherwise,
44 \fBdoor_cred()\fR returns \fB\(mi1\fR and sets \fBerrno\fR to indicate the
45 error.
46 .SH ERRORS
47 .LP
48 The \fBdoor_cred()\fR function will fail if:
49 .sp
50 .ne 2
51 .na
52 \fB\fBEFAULT\fR\fR
53 .ad
54 .RS 10n
55 The address of the \fIinfo\fR argument is invalid.
56 .RE
58 .sp
59 .ne 2
60 .na
61 \fB\fBEINVAL\fR\fR
62 .ad
63 .RS 10n
64 There is no associated door client.
65 .RE
67 .SH USAGE
68 .LP
69 The \fBdoor_cred()\fR function is obsolete. Applications should use the
70 \fBdoor_ucred\fR(3C) function in place of \fBdoor_cred()\fR.
71 .SH ATTRIBUTES
72 .LP
73 See \fBattributes\fR(5) for descriptions of the following attributes:
74 .sp
76 .sp
77 .TS
78 box;
79 c | c
80 l | l .
81 ATTRIBUTE TYPE  ATTRIBUTE VALUE
83 Architecture    all
85 Interface Stability     Obsolete
87 MT-Level        Safe
88 .TE
90 .SH SEE ALSO
91 .LP
92 \fBdoor_call\fR(3C), \fBdoor_create\fR(3C), \fBdoor_ucred\fR(3C),
93 \fBattributes\fR(5)