HP-UX Reference (11i v3 07/02) - 3 Library Functions N-Z (vol 7)
r
rpc_gss_set_callback(3N) rpc_gss_set_callback(3N)
NAME
rpc_gss_set_callback() - specify callback for context
SYNOPSIS
#include <rpc/rpcsec_gss.h>
bool_t rpc_gss_set_callback(
struct rpc_gss_callback_t *
cb);
DESCRIPTION
A server may want to specify a callback routine so that it knows when a context gets first used. This user-
defined callback may be specified through the
rpc_gss_set_callback()
routine. The callback rou-
tine is invoked the first time a context is used for data exchanges, after the context is established for the
specified program and version.
The user-defined callback routine should take the following form:
bool_t callback(
struct svc_req *
req,
gss_cred_id_t
deleg,
gss_ctx_id_t
gss_context ,
rpc_gss_lock_t *
lock
,
void **
cookie);
PARAMETERS
rpc_gss_set_callback()
takes one argument: a pointer to a rpc_gss_callback_t structure.
This structure contains the RPC program and version number as well as a pointer to a user-defined
call-
back()
routine. For a description of rpc_gss_callback_t
and other RPCSEC_GSS data types, see
the rpcsec_gss (3N) manpage.
The user-defined
callback() routine itself takes the following arguments:
req 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.
deleg Delegated credentials, if any. (See WARNING, below.)
gss_context GSS context (allows the server to do GSS operations on the context to test for acceptance cri-
teria). (See WARNING, below.)
lock This parameter is used to enforce a particular QOP and service for a session. This parameter
points to a
RPCSEC_GSS rpc_gss_lock_t
structure. When the call-back is invoked, the
rpc_gss_lock_t.locked
field is set to TRUE, thus locking the context. A locked context
will reject all requests having different values for QOP or service than those specified by the
raw_cred field of the
rpc_gss_lock_t
structure.
cookie A four-byte quantity that an application may use in any manner because RPC does not inter-
pret it. For example, the cookie could be a pointer or index to a structure that represents a
context initiator. The cookie is returned, along with the caller’s credentials, with each invoca-
tion of
rpc_gss_getcred()
.
MULTITHREAD USAGE
Thread Safe: Yes
Cancel Safe: Yes
Fork Safe: No
Async-cancel Safe: No
Async-signal Safe: No
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.
RETURN VALUE
rpc_gss_set_callback() returns TRUE if the use of the context is accepted; FALSE otherwise.
HP-UX 11i Version 3: February 2007 − 1 − Hewlett-Packard Company 331