Networking Services Library Functions rpc_gss_getcred(3NSL)
NAME
rpc_gss_getcred - get credentials of client
SYNOPSIS
#include
bool_t rpc_gss_getcred(struct svc_req *req, rpc_gss_rawcred_ t **rcred,
rpc_gss_ucred **ucred, void **cookie);
DESCRIPTION
rpc_gss_getcred() is used by a server to fetch the creden-
tials of a client. These credentials may either be networkcredentials (in the form of a rpc_gss_rawcred_t structure)
or UNIX credentials.For more information on RPCSEC_GSS data types, see the
rpcsec_gss(3NSL) man page.
PARAMETERS
Essentially, rpc_gss_getcred() passes a pointer to a
request (svc_req) as well as pointers to two credential
structures and a user-defined cookie; if rpc_gss_getcred()
is successful, at least one credential structure is "filled out" with values, as is, optionally, the cookie. req Pointer to the received service request.svc_req is an RPC structure containing informa-
tion on the context of an RPC invocation, such as program, version, and transport information.rcred A pointer to an rpc_gss_rawcred_t structure
pointer. This structure contains the versionnumber of the RPCSEC_GSS protocol being used; the
security mechanism and QOPs for this session (as strings); principal names for the client (as arpc_gss_principal_t structure) and server (as a
string); and the security service (integrity, privacy, etc., as an enum). If an application is not interested in these values, it may pass NULL for this parameter. ucred The caller's UNIX credentials, in the form of apointer to a pointer to a rpc_gss_ucred_t struc-
ture, which includes the client's uid and gids. If an application is not interested in these values, it may pass NULL for this parameter.SunOS 5.11 Last change: 5 Feb 2002 1
Networking Services Library Functions rpc_gss_getcred(3NSL)
cookie A four-byte quantity that an application may use
in any manner it wants to; RPC does not interpret it. (For example, a cookie may be a pointer or index to a structure that represents a contextinitiator.) See also rpc_gss_set_callback(3NSL).
RETURN VALUES
rpc_gss_getcred() returns TRUE if it is successful; other-
wise, use rpc_gss_get_error() to get the error associated
with the failure.ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:_______________________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|________________________________________|
| MT-Level | MT-Safe |
|_____________________________|________________________________________|
| Availability | system/library/security/rpcsec (32-bit)|
|_____________________________|________________________________________|
| | SUNWrsgx (64-bit) |
|_____________________________|________________________________________|
SEE ALSO
rpc(3NSL), rpc_gss_set_callback(3NSL),
rpc_gss_set_svc_name(3NSL), rpcsec_gss(3NSL), attributes(5)
ONC+ Developer's GuideLinn, J. RFC 2078, Generic Security Service Application Pro-
gram Interface, Version 2. Network Working Group. January 1997.SunOS 5.11 Last change: 5 Feb 2002 2