3
* Copyright 2004 by the Massachusetts Institute of Technology.
7
* Export of this software from the United States of America may require a
8
* specific license from the United States Government. It is the
9
* responsibility of any person or organization contemplating export to
10
* obtain such a license before exporting.
12
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute
13
* this software and its documentation for any purpose and without fee is
14
* hereby granted, provided that the above copyright notice appear in all
15
* copies and that both that copyright notice and this permission notice
16
* appear in supporting documentation, and that the name of M.I.T. not be
17
* used in advertising or publicity pertaining to distribution of the
18
* software without specific, written prior permission. Furthermore if you
19
* modify this software you must label your software as modified software
20
* and not distribute it in such a fashion that it might be confused with
21
* the original MIT software. M.I.T. makes no representations about the
22
* suitability of this software for any purpose. It is provided "as is"
23
* without express or implied warranty.
25
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
26
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
27
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29
* Individual source code files are copyright MIT, Cygnus Support,
30
* OpenVision, Oracle, Sun Soft, FundsXpress, and others.
32
* Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira,
33
* and Zephyr are trademarks of the Massachusetts Institute of Technology
34
* (MIT). No commercial use of these trademarks may be made without prior
35
* written permission of MIT.
37
* "Commercial use" means use of a name in a product or other for-profit
38
* manner. It does NOT prevent a commercial firm from referring to the MIT
39
* trademarks in order to convey information (although in doing so,
40
* recognition of their trademark status should be given).
45
* Prototypes for serv_ops.c
48
#ifndef __SERV_OPS_H__
49
#define __SERV_OPS_H__
51
#include "CredentialsCache.h"
54
#include "datastore.h"
56
struct type_to_op_mapping_t {
57
cc_int32 (*operations[CC_MSG_MAX_TYPE]) (
58
cc_server_context_t* ctx,
59
cc_auth_info_t* auth_info,
60
cc_session_info_t* session_info,
64
typedef struct type_to_op_mapping_t type_to_op_mapping_t;
66
cc_int32 cci_serv_initialize(void);
67
cc_int32 cci_serv_process_msg(cc_msg_t * msg, cc_auth_info_t* auth_info, cc_session_info_t* session_info, cc_msg_t** resp_msg);
68
cc_int32 cci_serv_find_ctx(cc_auth_info_t* auth_info, cc_session_info_t* session_info, cc_server_context_t** contextp);
69
cc_int32 cci_serv_find_ctx_by_handle(cc_handle ctx_handle, cc_auth_info_t *auth, cc_session_info_t* session, cc_server_context_t** contextp);
70
cc_int32 cci_serv_find_ccache_by_handle(cc_server_context_t* ctx, cc_handle ccache_handle, cc_server_ccache_t** ccachep) ;
71
cc_int32 cci_serv_find_ccache_iterator_by_handle(cc_server_context_t* ctx, cc_handle iterator, cc_generic_list_node_t** nodep);
72
cc_int32 cci_serv_find_creds_iterator_by_handle(cc_server_ccache_t* ccache, cc_handle iterator, cc_generic_list_node_t** nodep);
73
cc_int32 cci_serv_make_nack(cc_int32 err_code, cc_auth_info_t* auth_info, cc_session_info_t* session_info, cc_msg_t** msgp);
74
cc_int32 cci_serv_make_ack(void * header, cc_int32 header_len, cc_auth_info_t* auth_info, cc_session_info_t* session_info, cc_msg_t** msgp);
77
cc_server_context_t* ctx,
78
cc_auth_info_t* auth_info,
79
cc_session_info_t* session_info,
83
cc_int32 ccop_CTX_RELEASE(
84
cc_server_context_t* ctx,
85
cc_auth_info_t* auth_info,
86
cc_session_info_t* session_info,
90
cc_int32 ccop_CTX_GET_CHANGE_TIME(
91
cc_server_context_t* ctx,
92
cc_auth_info_t* auth_info,
93
cc_session_info_t* session_info,
97
cc_int32 ccop_CTX_GET_DEFAULT_CCACHE_NAME(
98
cc_server_context_t* ctx,
99
cc_auth_info_t* auth_info,
100
cc_session_info_t* session_info,
102
cc_msg_t **resp_msg);
104
cc_int32 ccop_CTX_COMPARE(
105
cc_server_context_t* ctx,
106
cc_auth_info_t* auth_info,
107
cc_session_info_t* session_info,
109
cc_msg_t **resp_msg);
111
cc_int32 ccop_CTX_NEW_CCACHE_ITERATOR(
112
cc_server_context_t* ctx,
113
cc_auth_info_t* auth_info,
114
cc_session_info_t* session_info,
116
cc_msg_t **resp_msg);
119
ccop_CTX_LOCK( cc_server_context_t* ctx,
120
cc_auth_info_t* auth_info,
121
cc_session_info_t* session_info,
123
cc_msg_t **resp_msg);
126
ccop_CTX_UNLOCK( cc_server_context_t* ctx,
127
cc_auth_info_t* auth_info,
128
cc_session_info_t* session_info,
130
cc_msg_t **resp_msg);
133
ccop_CTX_CLONE( cc_server_context_t* ctx,
134
cc_auth_info_t* auth_info,
135
cc_session_info_t* session_info,
137
cc_msg_t **resp_msg);
139
cc_int32 ccop_CCACHE_OPEN(
140
cc_server_context_t* ctx,
141
cc_auth_info_t* auth_info,
142
cc_session_info_t* session_info,
144
cc_msg_t **resp_msg);
146
cc_int32 ccop_CCACHE_OPEN_DEFAULT(
147
cc_server_context_t* ctx,
148
cc_auth_info_t* auth_info,
149
cc_session_info_t* session_info,
151
cc_msg_t **resp_msg);
153
cc_int32 ccop_CCACHE_CREATE(
154
cc_server_context_t* ctx,
155
cc_auth_info_t* auth_info,
156
cc_session_info_t* session_info,
158
cc_msg_t **resp_msg);
161
ccop_CCACHE_CREATE_DEFAULT( cc_server_context_t* ctx,
162
cc_auth_info_t* auth_info,
163
cc_session_info_t* session_info,
165
cc_msg_t **resp_msg);
168
ccop_CCACHE_CREATE_UNIQUE( cc_server_context_t* ctx,
169
cc_auth_info_t* auth_info,
170
cc_session_info_t* session_info,
172
cc_msg_t **resp_msg);
174
cc_int32 ccop_CCACHE_RELEASE(
175
cc_server_context_t* ctx,
176
cc_auth_info_t* auth_info,
177
cc_session_info_t* session_info,
179
cc_msg_t **resp_msg);
181
cc_int32 ccop_CCACHE_DESTROY(
182
cc_server_context_t* ctx,
183
cc_auth_info_t* auth_info,
184
cc_session_info_t* session_info,
186
cc_msg_t **resp_msg);
188
cc_int32 ccop_CCACHE_SET_DEFAULT(
189
cc_server_context_t* ctx,
190
cc_auth_info_t* auth_info,
191
cc_session_info_t* session_info,
193
cc_msg_t **resp_msg);
195
cc_int32 ccop_CCACHE_GET_CREDS_VERSION(
196
cc_server_context_t* ctx,
197
cc_auth_info_t* auth_info,
198
cc_session_info_t* session_info,
200
cc_msg_t **resp_msg);
202
cc_int32 ccop_CCACHE_GET_NAME(
203
cc_server_context_t* ctx,
204
cc_auth_info_t* auth_info,
205
cc_session_info_t* session_info,
207
cc_msg_t **resp_msg);
209
cc_int32 ccop_CCACHE_GET_PRINCIPAL(
210
cc_server_context_t* ctx,
211
cc_auth_info_t* auth_info,
212
cc_session_info_t* session_info,
214
cc_msg_t **resp_msg);
216
cc_int32 ccop_CCACHE_SET_PRINCIPAL(
217
cc_server_context_t* ctx,
218
cc_auth_info_t* auth_info,
219
cc_session_info_t* session_info,
221
cc_msg_t **resp_msg);
223
cc_int32 ccop_CCACHE_CREDS_ITERATOR(
224
cc_server_context_t* ctx,
225
cc_auth_info_t* auth_info,
226
cc_session_info_t* session_info,
228
cc_msg_t **resp_msg);
230
cc_int32 ccop_CCACHE_STORE_CREDS(
231
cc_server_context_t* ctx,
232
cc_auth_info_t* auth_info,
233
cc_session_info_t* session_info,
235
cc_msg_t **resp_msg);
237
cc_int32 ccop_CCACHE_REM_CREDS(
238
cc_server_context_t* ctx,
239
cc_auth_info_t* auth_info,
240
cc_session_info_t* session_info,
242
cc_msg_t **resp_msg);
244
cc_int32 ccop_CCACHE_GET_LAST_DEFAULT_TIME(
245
cc_server_context_t* ctx,
246
cc_auth_info_t* auth_info,
247
cc_session_info_t* session_info,
249
cc_msg_t **resp_msg);
252
ccop_CCACHE_GET_CHANGE_TIME(
253
cc_server_context_t* ctx,
254
cc_auth_info_t* auth_info,
255
cc_session_info_t* session_info,
257
cc_msg_t **resp_msg) ;
259
cc_int32 ccop_CCACHE_COMPARE(
260
cc_server_context_t* ctx,
261
cc_auth_info_t* auth_info,
262
cc_session_info_t* session_info,
264
cc_msg_t **resp_msg);
266
cc_int32 ccop_CCACHE_GET_KDC_TIME_OFFSET(
267
cc_server_context_t* ctx,
268
cc_auth_info_t* auth_info,
269
cc_session_info_t* session_info,
271
cc_msg_t **resp_msg);
273
cc_int32 ccop_CCACHE_SET_KDC_TIME_OFFSET(
274
cc_server_context_t* ctx,
275
cc_auth_info_t* auth_info,
276
cc_session_info_t* session_info,
278
cc_msg_t **resp_msg);
280
cc_int32 ccop_CCACHE_CLEAR_KDC_TIME_OFFSET(
281
cc_server_context_t* ctx,
282
cc_auth_info_t* auth_info,
283
cc_session_info_t* session_info,
285
cc_msg_t **resp_msg);
287
cc_int32 ccop_CCACHE_ITERATOR_RELEASE(
288
cc_server_context_t* ctx,
289
cc_auth_info_t* auth_info,
290
cc_session_info_t* session_info,
292
cc_msg_t **resp_msg);
294
cc_int32 ccop_CCACHE_ITERATOR_NEXT(
295
cc_server_context_t* ctx,
296
cc_auth_info_t* auth_info,
297
cc_session_info_t* session_info,
299
cc_msg_t **resp_msg);
301
cc_int32 ccop_CREDS_ITERATOR_RELEASE(
302
cc_server_context_t* ctx,
303
cc_auth_info_t* auth_info,
304
cc_session_info_t* session_info,
306
cc_msg_t **resp_msg);
308
cc_int32 ccop_CREDS_ITERATOR_NEXT(
309
cc_server_context_t* ctx,
310
cc_auth_info_t* auth_info,
311
cc_session_info_t* session_info,
313
cc_msg_t **resp_msg);
315
cc_int32 ccop_CREDS_RELEASE(
316
cc_server_context_t* ctx,
317
cc_auth_info_t* auth_info,
318
cc_session_info_t* session_info,
320
cc_msg_t **resp_msg);
321
#endif /*__SERV_OPS_H__*/