Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > R


HP-UX 11i Version 3: February 2007

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index


rpc_gss_getcred() — get credentials of client


#include <rpc/rpcsec_gss.h>

bool_t rpc_gss_getcred( struct svc_req *req, rpc_gss_rawcred_t **rcred, rpc_gss_ucred **ucred, void **cookie);


rpc_gss_getcred() is used by a server to fetch the credentials of a client. These credentials may either be network credentials (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(3N) manpage.


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.


Pointer to the received service request. svc_req is an RPC structure containing information on the context of an RPC invocation, such as program, version, and transport information.


A pointer to an rpc_gss_rawcred_t structure pointer. This structure contains the version number of the RPCSEC_GSS protocol being used; the security mechanism and QOPs for this session (as strings); principal names for the client (as a rpc_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.


The caller's UNIX credentials, in the form of a pointer to a pointer to a rpc_gss_ucred_t structure, which includes the client's uid and gids. If an application is not interested in these values, it may pass NULL for this parameter.


A four-byte quantity that an application may use in any manner it wants to, because RPC does not interpret it. (For example, a cookie may be a pointer or index to a structure that represents a context initiator.) See the rpc_gss_set_callback(3N) manpage.


Thread Safe:


Cancel Safe:


Fork Safe:


Async-cancel Safe:


Async-signal Safe:


These functions can be called safely in a multithreaded environment. They may be cancellation points in that they call functions that are cancel points.

In a multithreaded environment, these functions are not safe to be called by a child process after fork() and before exec(). These functions should not be called by a multithreaded application that supports asynchronous cancellation or asynchronous signals.


rpc_gss_getcred() returns TRUE if it is successful; otherwise, use rpc_gss_get_error() to get the error associated with the failure.


rpc(3N), rpc_gss_set_callback(3N), rpc_gss_set_svc_name(3N), rpcsec_gss(3N).

ONC+ Developer's Guide

Network Working Group RFC 2078

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.