Networking Services Library Functions rpcgssgetcred(3NSL)
NAME
rpcgssgetcred - get credentials of client
SYNOPSIS
#include
boolt rpcgssgetcred(struct svcreq *req, rpcgssrawcred t **rcred,
rpcgssucred **ucred, void **cookie);
DESCRIPTION
rpcgssgetcred() is used by a server to fetch the creden-
tials of a client. These credentials may either be network
credentials (in the form of a rpcgssrawcredt structure)
or UNIX credentials.
For more information on RPCSECGS data types, see the
rpcsecgss(3NSL) man page.
PARAMETERS
Essentially, rpcgssgetcred() passes a pointer to a
request (svcreq) as well as pointers to two credential
structures and a user-defined cookie; if rpcgssgetcred()
is successful, at least one credential structure is "filled
out" with values, as is, optionally, the cookie.
req Pointer to the received service request.
svcreq 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 rpcgssrawcredt structure
pointer. This structure contains the version
number of the RPCSECGS protocol being used; the
security mechanism and QOPs for this session (as
strings); principal names for the client (as a
rpcgssprincipalt 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 NUL
for this parameter.
ucred The caller's UNIX credentials, in the form of a
pointer to a pointer to a rpcgssucredt struc-
ture, which includes the client's uid and gids.
If an application is not interested in these
values, it may pass NUL for this parameter.
SunOS 5.11 Last change: 5 Feb 2002 1
Networking Services Library Functions rpcgssgetcred(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 context
initiator.) See also rpcgsssetcallback(3NSL).
RETURN VALUES
rpcgssgetcred() returns TRUE if it is successful; other-
wise, use rpcgssgeterror() to get the error associated
with the failure.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
MT-Level MT-Safe
Availability SUNWrsg (32-bit)
SUNWrsgx (64-bit)
SEE ALSO
rpc(3NSL), rpcgsssetcallback(3NSL),
rpcgsssetsvcname(3NSL), rpcsecgss(3NSL), attributes(5)
ONC] Developer's Guide
Linn, 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
|