2 .\" Copyright (C) 2002, 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 RPC_GSS_GETCRED 3NSL "Feb 5, 2002"
8 rpc_gss_getcred \- get credentials of client
12 #include <rpc/rpcsec_gss.h>
14 \fBbool_t\fR \fBrpc_gss_getcred\fR(\fBstruct svc_req\fR \fI*req\fR, \fBrpc_gss_rawcred_ t\fR \fI**rcred\fR,
15 \fBrpc_gss_ucred\fR \fI**ucred\fR, \fBvoid\fR \fI**cookie\fR);
21 \fBrpc_gss_getcred()\fR is used by a server to fetch the credentials of a
22 client. These credentials may either be network credentials (in the form of a
23 \fBrpc_gss_rawcred_t\fR structure) or UNIX credentials.
26 For more information on \fBRPCSEC_GSS\fR data types, see the
27 \fBrpcsec_gss\fR(3NSL) man page.
31 Essentially, \fBrpc_gss_getcred()\fR passes a pointer to a request
32 (\fBsvc_req\fR) as well as pointers to two credential structures and a
33 user-defined cookie; if \fBrpc_gss_getcred()\fR is successful, at least one
34 credential structure is "filled out" with values, as is, optionally, the
42 Pointer to the received service request. \fBsvc_req\fR is an RPC structure
43 containing information on the context of an RPC invocation, such as program,
44 version, and transport information.
53 A pointer to an \fBrpc_gss_rawcred_t\fR structure pointer. This structure
54 contains the version number of the \fBRPCSEC_GSS\fR protocol being used; the
55 security mechanism and QOPs for this session (as strings); principal names for
56 the client (as a \fBrpc_gss_principal_t\fR structure) and server (as a string);
57 and the security service (integrity, privacy, etc., as an enum). If an
58 application is not interested in these values, it may pass \fINULL\fR for this
68 The caller's UNIX credentials, in the form of a pointer to a pointer to a
69 \fBrpc_gss_ucred_t\fR structure, which includes the client's uid and gids. If
70 an application is not interested in these values, it may pass \fINULL\fR for
80 A four-byte quantity that an application may use in any manner it wants to; RPC
81 does not interpret it. (For example, a cookie may be a pointer or index to a
82 structure that represents a context initiator.) See also
83 \fBrpc_gss_set_callback\fR(3NSL).
89 \fBrpc_gss_getcred()\fR returns TRUE if it is successful; otherwise, use
90 \fBrpc_gss_get_error()\fR to get the error associated with the failure.
94 See \fBattributes\fR(5) for descriptions of the following attributes:
102 ATTRIBUTE TYPE ATTRIBUTE VALUE
110 \fBrpc\fR(3NSL), \fBrpc_gss_set_callback\fR(3NSL), \fBrpc_gss_set_svc_name\fR(3NSL), \fBrpcsec_gss\fR(3NSL), \fBattributes\fR(5)
113 \fIONC+ Developer\&'s Guide\fR