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_SET_CALLBACK 3NSL "Feb 5, 2002"
8 rpc_gss_set_callback \- specify callback for context
12 #include <rpc/rpcsec_gss.h>
14 \fBbool_t\fR \fBrpc_gss_set_callback\fR(\fBstruct rpc_gss_callback_t\fR \fI*cb\fR);
20 A server may want to specify a callback routine so that it knows when a context
21 gets first used. This user-defined callback may be specified through the
22 \fBrpc_gss_set_callback()\fR routine. The callback routine is invoked the
23 first time a context is used for data exchanges, after the context is
24 established for the specified program and version.
27 The user-defined callback routine should take the following form:
31 bool_t callback(struct svc_req\fI *req\fR, gss_cred_id_t\fI deleg\fR,
32 gss_ctx_id_t\fI gss_context\fR, rpc_gss_lock_t\fI *lock\fR, void\fI **cookie\fR);
39 \fBrpc_gss_set_callback()\fR takes one argument: a pointer to a
40 \fBrpc_gss_callback_t\fR structure. This structure contains the RPC program
41 and version number as well as a pointer to a user-defined \fBcallback()\fR
42 routine. (For a description of \fBrpc_gss_callback_t\fR and other
43 \fBRPCSEC_GSS\fR data types, see the \fBrpcsec_gss\fR(3NSL) man page.)
46 The user-defined \fBcallback()\fR routine itself takes the following arguments:
53 Pointer to the received service request. \fBsvc_req\fR is an RPC structure
54 containing information on the context of an RPC invocation, such as program,
55 version, and transport information.
64 Delegated credentials, if any. (See \fBNOTES,\fR below.)
70 \fB\fIgss_context\fR \fR
73 GSS context (allows server to do GSS operations on the context to test for
74 acceptance criteria). See \fBNOTES,\fR below.
83 This parameter is used to enforce a particular QOP and service for a session.
84 This parameter points to a \fBRPCSEC_GSS\fR \fBrpc_gss_lock_t\fR structure.
85 When the callback is invoked, the \fBrpc_gss_lock_t.locked\fR field is set to
86 TRUE, thus locking the context. A locked context will reject all requests
87 having different values for QOP or service than those specified by the
88 \fBraw_cred\fR field of the \fBrpc_gss_lock_t\fR structure.
97 A four-byte quantity that an application may use in any manner it wants to \(em
98 RPC does not interpret it. (For example, the cookie could be a pointer or
99 index to a structure that represents a context initiator.) The cookie is
100 returned, along with the caller's credentials, with each invocation of
101 \fBrpc_gss_getcred()\fR.
107 \fBrpc_gss_set_callback()\fR returns TRUE if the use of the context is
108 accepted; false otherwise.
112 See \fBattributes\fR(5) for descriptions of the following attributes:
120 ATTRIBUTE TYPE ATTRIBUTE VALUE
128 \fBrpc\fR(3NSL), \fBrpc_gss_getcred\fR(3NSL), \fBrpcsec_gss\fR(3NSL), \fBattributes\fR(5)
131 \fIONC+ Developer\&'s Guide\fR
134 Linn, J. \fIRFC 2078, Generic Security Service Application Program Interface, Version 2\fR. Network Working Group. January 1997.
138 If a server does not specify a callback, all incoming contexts will be accepted.