1 /* ccapi/lib/mac/ccapi_vector.c */
3 * Copyright 2006 Massachusetts Institute of Technology.
6 * Export of this software from the United States of America may
7 * require a specific license from the United States Government.
8 * It is the responsibility of any person or organization contemplating
9 * export to obtain such a license before exporting.
11 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
12 * distribute this software and its documentation for any purpose and
13 * without fee is hereby granted, provided that the above copyright
14 * notice appear in all copies and that both that copyright notice and
15 * this permission notice appear in supporting documentation, and that
16 * the name of M.I.T. not be used in advertising or publicity pertaining
17 * to distribution of the software without specific, written prior
18 * permission. Furthermore if you modify this software you must label
19 * your software as modified software and not distribute it in such a
20 * fashion that it might be confused with the original M.I.T. software.
21 * M.I.T. makes no representations about the suitability of
22 * this software for any purpose. It is provided "as is" without express
23 * or implied warranty.
26 #include "ccapi_vector.h"
28 #include "ccapi_context.h"
29 #include "ccapi_string.h"
30 #include "ccapi_ccache.h"
31 #include "ccapi_credentials.h"
32 #include "ccapi_ccache_iterator.h"
33 #include "ccapi_credentials_iterator.h"
35 /* ------------------------------------------------------------------------ */
37 static void cci_swap_string_functions (cc_string_t io_string)
39 cc_string_f temp = *(io_string->functions);
40 *((cc_string_f *)io_string->functions) = *(io_string->vector_functions);
41 *((cc_string_f *)io_string->vector_functions) = temp;
44 /* ------------------------------------------------------------------------ */
46 static void cci_swap_context_functions (cc_context_t io_context)
48 cc_context_f temp = *(io_context->functions);
49 *((cc_context_f *)io_context->functions) = *(io_context->vector_functions);
50 *((cc_context_f *)io_context->vector_functions) = temp;
53 /* ------------------------------------------------------------------------ */
55 static void cci_swap_ccache_functions (cc_ccache_t io_ccache)
57 cc_ccache_f temp = *(io_ccache->functions);
58 *((cc_ccache_f *)io_ccache->functions) = *(io_ccache->vector_functions);
59 *((cc_ccache_f *)io_ccache->vector_functions) = temp;
62 /* ------------------------------------------------------------------------ */
64 static void cci_swap_credentials_functions (cc_credentials_t io_credentials)
66 cc_credentials_f temp = *(io_credentials->functions);
67 *((cc_credentials_f *)io_credentials->functions) = *(io_credentials->otherFunctions);
68 *((cc_credentials_f *)io_credentials->otherFunctions) = temp;
71 /* ------------------------------------------------------------------------ */
73 static void cci_swap_ccache_iterator_functions (cc_ccache_iterator_t io_ccache_iterator)
75 cc_ccache_iterator_f temp = *(io_ccache_iterator->functions);
76 *((cc_ccache_iterator_f *)io_ccache_iterator->functions) = *(io_ccache_iterator->vector_functions);
77 *((cc_ccache_iterator_f *)io_ccache_iterator->vector_functions) = temp;
80 /* ------------------------------------------------------------------------ */
82 static void cci_swap_credentials_iterator_functions (cc_credentials_iterator_t io_credentials_iterator)
84 cc_credentials_iterator_f temp = *(io_credentials_iterator->functions);
85 *((cc_credentials_iterator_f *)io_credentials_iterator->functions) = *(io_credentials_iterator->vector_functions);
86 *((cc_credentials_iterator_f *)io_credentials_iterator->vector_functions) = temp;
91 /* ------------------------------------------------------------------------ */
93 cc_int32 __cc_initialize_vector (cc_context_t *out_context,
95 cc_int32 *out_supported_version,
96 char const **out_vendor)
98 return cc_initialize (out_context, in_version, out_supported_version, out_vendor);
103 /* ------------------------------------------------------------------------ */
105 cc_int32 __cc_string_release_vector (cc_string_t in_string)
107 cci_swap_string_functions (in_string);
108 return ccapi_string_release (in_string);
113 /* ------------------------------------------------------------------------ */
115 cc_int32 __cc_context_release_vector (cc_context_t io_context)
117 cci_swap_context_functions (io_context);
118 return ccapi_context_release (io_context);
121 /* ------------------------------------------------------------------------ */
123 cc_int32 __cc_context_get_change_time_vector (cc_context_t in_context,
124 cc_time_t *out_change_time)
126 cc_int32 err = ccNoError;
127 cci_swap_context_functions (in_context);
128 err = ccapi_context_get_change_time (in_context, out_change_time);
129 cci_swap_context_functions (in_context);
133 /* ------------------------------------------------------------------------ */
135 cc_int32 __cc_context_get_default_ccache_name_vector (cc_context_t in_context,
136 cc_string_t *out_name)
138 cc_int32 err = ccNoError;
139 cci_swap_context_functions (in_context);
140 err = ccapi_context_get_default_ccache_name (in_context, out_name);
141 cci_swap_context_functions (in_context);
145 /* ------------------------------------------------------------------------ */
147 cc_int32 __cc_context_open_ccache_vector (cc_context_t in_context,
149 cc_ccache_t *out_ccache)
151 cc_int32 err = ccNoError;
152 cci_swap_context_functions (in_context);
153 err = ccapi_context_open_ccache (in_context, in_name, out_ccache);
154 cci_swap_context_functions (in_context);
158 /* ------------------------------------------------------------------------ */
160 cc_int32 __cc_context_open_default_ccache_vector (cc_context_t in_context,
161 cc_ccache_t *out_ccache)
163 cc_int32 err = ccNoError;
164 cci_swap_context_functions (in_context);
165 err = ccapi_context_open_default_ccache (in_context, out_ccache);
166 cci_swap_context_functions (in_context);
170 /* ------------------------------------------------------------------------ */
172 cc_int32 __cc_context_create_ccache_vector (cc_context_t in_context,
174 cc_uint32 in_cred_vers,
175 const char *in_principal,
176 cc_ccache_t *out_ccache)
178 cc_int32 err = ccNoError;
179 cci_swap_context_functions (in_context);
180 err = ccapi_context_create_ccache (in_context, in_name, in_cred_vers, in_principal, out_ccache);
181 cci_swap_context_functions (in_context);
186 /* ------------------------------------------------------------------------ */
188 cc_int32 __cc_context_create_default_ccache_vector (cc_context_t in_context,
189 cc_uint32 in_cred_vers,
190 const char *in_principal,
191 cc_ccache_t *out_ccache)
193 cc_int32 err = ccNoError;
194 cci_swap_context_functions (in_context);
195 err = ccapi_context_create_default_ccache (in_context, in_cred_vers, in_principal, out_ccache);
196 cci_swap_context_functions (in_context);
200 /* ------------------------------------------------------------------------ */
202 cc_int32 __cc_context_create_new_ccache_vector (cc_context_t in_context,
203 cc_uint32 in_cred_vers,
204 const char *in_principal,
205 cc_ccache_t *out_ccache)
207 cc_int32 err = ccNoError;
208 cci_swap_context_functions (in_context);
209 err = ccapi_context_create_new_ccache (in_context, in_cred_vers, in_principal, out_ccache);
210 cci_swap_context_functions (in_context);
214 /* ------------------------------------------------------------------------ */
216 cc_int32 __cc_context_new_ccache_iterator_vector (cc_context_t in_context,
217 cc_ccache_iterator_t *out_iterator)
219 cc_int32 err = ccNoError;
220 cci_swap_context_functions (in_context);
221 err = ccapi_context_new_ccache_iterator (in_context, out_iterator);
222 cci_swap_context_functions (in_context);
226 /* ------------------------------------------------------------------------ */
228 cc_int32 __cc_context_lock_vector (cc_context_t in_context,
229 cc_uint32 in_lock_type,
232 cc_int32 err = ccNoError;
233 cci_swap_context_functions (in_context);
234 err = ccapi_context_lock (in_context, in_lock_type, in_block);
235 cci_swap_context_functions (in_context);
239 /* ------------------------------------------------------------------------ */
241 cc_int32 __cc_context_unlock_vector (cc_context_t in_context)
243 cc_int32 err = ccNoError;
244 cci_swap_context_functions (in_context);
245 err = ccapi_context_unlock (in_context);
246 cci_swap_context_functions (in_context);
250 /* ------------------------------------------------------------------------ */
252 cc_int32 __cc_context_compare_vector (cc_context_t in_context,
253 cc_context_t in_compare_to_context,
254 cc_uint32 *out_equal)
256 cc_int32 err = ccNoError;
257 cci_swap_context_functions (in_context);
258 err = ccapi_context_compare (in_context, in_compare_to_context, out_equal);
259 cci_swap_context_functions (in_context);
265 /* ------------------------------------------------------------------------ */
267 cc_int32 __cc_ccache_release_vector (cc_ccache_t io_ccache)
269 cci_swap_ccache_functions (io_ccache);
270 return ccapi_ccache_release (io_ccache);
273 /* ------------------------------------------------------------------------ */
275 cc_int32 __cc_ccache_destroy_vector (cc_ccache_t io_ccache)
277 cci_swap_ccache_functions (io_ccache);
278 return ccapi_ccache_destroy (io_ccache);
281 /* ------------------------------------------------------------------------ */
283 cc_int32 __cc_ccache_set_default_vector (cc_ccache_t io_ccache)
285 cc_int32 err = ccNoError;
286 cci_swap_ccache_functions (io_ccache);
287 err = ccapi_ccache_set_default (io_ccache);
288 cci_swap_ccache_functions (io_ccache);
292 /* ------------------------------------------------------------------------ */
294 cc_uint32 __cc_ccache_get_credentials_version_vector (cc_ccache_t in_ccache,
295 cc_uint32 *out_credentials_version)
297 cc_int32 err = ccNoError;
298 cci_swap_ccache_functions (in_ccache);
299 err = ccapi_ccache_get_credentials_version (in_ccache, out_credentials_version);
300 cci_swap_ccache_functions (in_ccache);
304 /* ------------------------------------------------------------------------ */
306 cc_int32 __cc_ccache_get_name_vector (cc_ccache_t in_ccache,
307 cc_string_t *out_name)
309 cc_int32 err = ccNoError;
310 cci_swap_ccache_functions (in_ccache);
311 err = ccapi_ccache_get_name (in_ccache, out_name);
312 cci_swap_ccache_functions (in_ccache);
316 /* ------------------------------------------------------------------------ */
318 cc_int32 __cc_ccache_get_principal_vector (cc_ccache_t in_ccache,
319 cc_uint32 in_credentials_version,
320 cc_string_t *out_principal)
322 cc_int32 err = ccNoError;
323 cci_swap_ccache_functions (in_ccache);
324 err = ccapi_ccache_get_principal (in_ccache, in_credentials_version, out_principal);
325 cci_swap_ccache_functions (in_ccache);
329 /* ------------------------------------------------------------------------ */
331 cc_int32 __cc_ccache_set_principal_vector (cc_ccache_t io_ccache,
332 cc_uint32 in_credentials_version,
333 const char *in_principal)
335 cc_int32 err = ccNoError;
336 cci_swap_ccache_functions (io_ccache);
337 err = ccapi_ccache_set_principal (io_ccache, in_credentials_version, in_principal);
338 cci_swap_ccache_functions (io_ccache);
342 /* ------------------------------------------------------------------------ */
344 cc_int32 __cc_ccache_store_credentials_vector (cc_ccache_t io_ccache,
345 const cc_credentials_union *in_credentials_union)
347 cc_int32 err = ccNoError;
348 cci_swap_ccache_functions (io_ccache);
349 err = ccapi_ccache_store_credentials (io_ccache, in_credentials_union);
350 cci_swap_ccache_functions (io_ccache);
354 /* ------------------------------------------------------------------------ */
356 cc_int32 __cc_ccache_remove_credentials_vector (cc_ccache_t io_ccache,
357 cc_credentials_t in_credentials)
359 cc_int32 err = ccNoError;
360 cci_swap_ccache_functions (io_ccache);
361 cci_swap_credentials_functions (in_credentials);
362 err = ccapi_ccache_remove_credentials (io_ccache, in_credentials);
363 cci_swap_ccache_functions (io_ccache);
364 cci_swap_credentials_functions (in_credentials);
368 /* ------------------------------------------------------------------------ */
370 cc_int32 __cc_ccache_new_credentials_iterator_vector (cc_ccache_t in_ccache,
371 cc_credentials_iterator_t *out_credentials_iterator)
373 cc_int32 err = ccNoError;
374 cci_swap_ccache_functions (in_ccache);
375 err = ccapi_ccache_new_credentials_iterator (in_ccache, out_credentials_iterator);
376 cci_swap_ccache_functions (in_ccache);
380 /* ------------------------------------------------------------------------ */
382 cc_int32 __cc_ccache_move_vector (cc_ccache_t io_source_ccache,
383 cc_ccache_t io_destination_ccache)
385 cc_int32 err = ccNoError;
386 cci_swap_ccache_functions (io_source_ccache);
387 cci_swap_ccache_functions (io_destination_ccache);
388 err = ccapi_ccache_move (io_source_ccache, io_destination_ccache);
389 cci_swap_ccache_functions (io_source_ccache);
390 cci_swap_ccache_functions (io_destination_ccache);
394 /* ------------------------------------------------------------------------ */
396 cc_int32 __cc_ccache_lock_vector (cc_ccache_t io_ccache,
397 cc_uint32 in_lock_type,
400 cc_int32 err = ccNoError;
401 cci_swap_ccache_functions (io_ccache);
402 err = ccapi_ccache_lock (io_ccache, in_lock_type, in_block);
403 cci_swap_ccache_functions (io_ccache);
407 /* ------------------------------------------------------------------------ */
409 cc_int32 __cc_ccache_unlock_vector (cc_ccache_t io_ccache)
411 cc_int32 err = ccNoError;
412 cci_swap_ccache_functions (io_ccache);
413 err = ccapi_ccache_unlock (io_ccache);
414 cci_swap_ccache_functions (io_ccache);
418 /* ------------------------------------------------------------------------ */
420 cc_int32 __cc_ccache_get_last_default_time_vector (cc_ccache_t in_ccache,
421 cc_time_t *out_last_default_time)
423 cc_int32 err = ccNoError;
424 cci_swap_ccache_functions (in_ccache);
425 err = ccapi_ccache_get_last_default_time (in_ccache, out_last_default_time);
426 cci_swap_ccache_functions (in_ccache);
430 /* ------------------------------------------------------------------------ */
432 cc_int32 __cc_ccache_get_change_time_vector (cc_ccache_t in_ccache,
433 cc_time_t *out_change_time)
435 cc_int32 err = ccNoError;
436 cci_swap_ccache_functions (in_ccache);
437 err = ccapi_ccache_get_change_time (in_ccache, out_change_time);
438 cci_swap_ccache_functions (in_ccache);
442 /* ------------------------------------------------------------------------ */
444 cc_int32 __cc_ccache_compare_vector (cc_ccache_t in_ccache,
445 cc_ccache_t in_compare_to_ccache,
446 cc_uint32 *out_equal)
448 cc_int32 err = ccNoError;
449 cci_swap_ccache_functions (in_ccache);
450 cci_swap_ccache_functions (in_compare_to_ccache);
451 err = ccapi_ccache_compare (in_ccache, in_compare_to_ccache, out_equal);
452 cci_swap_ccache_functions (in_ccache);
453 cci_swap_ccache_functions (in_compare_to_ccache);
459 /* ------------------------------------------------------------------------ */
461 cc_int32 __cc_credentials_release_vector (cc_credentials_t io_credentials)
463 cci_swap_credentials_functions (io_credentials);
464 return ccapi_credentials_release (io_credentials);
467 /* ------------------------------------------------------------------------ */
469 cc_int32 __cc_credentials_compare_vector (cc_credentials_t in_credentials,
470 cc_credentials_t in_compare_to_credentials,
471 cc_uint32 *out_equal)
473 cc_int32 err = ccNoError;
474 cci_swap_credentials_functions (in_credentials);
475 cci_swap_credentials_functions (in_compare_to_credentials);
476 err = ccapi_credentials_compare (in_credentials, in_compare_to_credentials, out_equal);
477 cci_swap_credentials_functions (in_credentials);
478 cci_swap_credentials_functions (in_compare_to_credentials);
484 /* ------------------------------------------------------------------------ */
486 cc_int32 __cc_ccache_iterator_release_vector (cc_ccache_iterator_t io_ccache_iterator)
488 cci_swap_ccache_iterator_functions (io_ccache_iterator);
489 return ccapi_ccache_iterator_release (io_ccache_iterator);
492 /* ------------------------------------------------------------------------ */
494 cc_int32 __cc_ccache_iterator_next_vector (cc_ccache_iterator_t in_ccache_iterator,
495 cc_ccache_t *out_ccache)
497 cc_int32 err = ccNoError;
498 cci_swap_ccache_iterator_functions (in_ccache_iterator);
499 err = ccapi_ccache_iterator_next (in_ccache_iterator, out_ccache);
500 cci_swap_ccache_iterator_functions (in_ccache_iterator);
506 /* ------------------------------------------------------------------------ */
508 cc_int32 __cc_credentials_iterator_release_vector (cc_credentials_iterator_t io_credentials_iterator)
510 cci_swap_credentials_iterator_functions (io_credentials_iterator);
511 return ccapi_credentials_iterator_release (io_credentials_iterator);
514 /* ------------------------------------------------------------------------ */
516 cc_int32 __cc_credentials_iterator_next_vector (cc_credentials_iterator_t in_credentials_iterator,
517 cc_credentials_t *out_credentials)
519 cc_int32 err = ccNoError;
520 cci_swap_credentials_iterator_functions (in_credentials_iterator);
521 err = ccapi_credentials_iterator_next (in_credentials_iterator, out_credentials);
522 cci_swap_credentials_iterator_functions (in_credentials_iterator);
528 /* ------------------------------------------------------------------------ */
530 cc_int32 __cc_shutdown_vector (apiCB **io_context)
532 cci_swap_context_functions (*io_context);
533 return cc_shutdown (io_context);
536 /* ------------------------------------------------------------------------ */
538 cc_int32 __cc_get_NC_info_vector (apiCB *in_context,
541 cc_int32 err = ccNoError;
542 cci_swap_context_functions (in_context);
543 err = cc_get_NC_info (in_context, out_info);
544 cci_swap_context_functions (in_context);
548 /* ------------------------------------------------------------------------ */
550 cc_int32 __cc_get_change_time_vector (apiCB *in_context,
551 cc_time_t *out_change_time)
553 cc_int32 err = ccNoError;
554 cci_swap_context_functions (in_context);
555 err = cc_get_change_time (in_context, out_change_time);
556 cci_swap_context_functions (in_context);
560 /* ------------------------------------------------------------------------ */
562 cc_int32 __cc_open_vector (apiCB *in_context,
566 ccache_p **out_ccache)
568 cc_int32 err = ccNoError;
569 cci_swap_context_functions (in_context);
570 err = cc_open (in_context, in_name, in_version, in_flags, out_ccache);
571 cci_swap_context_functions (in_context);
575 /* ------------------------------------------------------------------------ */
577 cc_int32 __cc_create_vector (apiCB *in_context,
579 const char *in_principal,
582 ccache_p **out_ccache)
584 cc_int32 err = ccNoError;
585 cci_swap_context_functions (in_context);
586 err = cc_create (in_context, in_name, in_principal, in_version, in_flags, out_ccache);
587 cci_swap_context_functions (in_context);
591 /* ------------------------------------------------------------------------ */
593 cc_int32 __cc_close_vector (apiCB *in_context,
594 ccache_p **io_ccache)
596 cc_int32 err = ccNoError;
597 cci_swap_context_functions (in_context);
598 cci_swap_ccache_functions (*io_ccache);
599 err = cc_close (in_context, io_ccache);
600 cci_swap_context_functions (in_context);
604 /* ------------------------------------------------------------------------ */
606 cc_int32 __cc_destroy_vector (apiCB *in_context,
607 ccache_p **io_ccache)
609 cc_int32 err = ccNoError;
610 cci_swap_context_functions (in_context);
611 cci_swap_ccache_functions (*io_ccache);
612 err = cc_destroy (in_context, io_ccache);
613 cci_swap_context_functions (in_context);
617 /* ------------------------------------------------------------------------ */
619 cc_int32 __cc_seq_fetch_NCs_begin_vector (apiCB *in_context,
620 ccache_cit **out_iterator)
622 cc_int32 err = ccNoError;
623 cci_swap_context_functions (in_context);
624 err = cc_seq_fetch_NCs_begin (in_context, out_iterator);
625 cci_swap_context_functions (in_context);
630 /* ------------------------------------------------------------------------ */
632 cc_int32 __cc_seq_fetch_NCs_next_vector (apiCB *in_context,
633 ccache_p **out_ccache,
634 ccache_cit *in_iterator)
636 cc_int32 err = ccNoError;
637 cci_swap_context_functions (in_context);
638 cci_swap_ccache_iterator_functions ((ccache_cit_ccache *)in_iterator);
639 err = cc_seq_fetch_NCs_next (in_context, out_ccache, in_iterator);
640 cci_swap_context_functions (in_context);
641 cci_swap_ccache_iterator_functions ((ccache_cit_ccache *)in_iterator);
645 /* ------------------------------------------------------------------------ */
647 cc_int32 __cc_seq_fetch_NCs_end_vector (apiCB *in_context,
648 ccache_cit **io_iterator)
650 cc_int32 err = ccNoError;
651 cci_swap_context_functions (in_context);
652 cci_swap_ccache_iterator_functions ((ccache_cit_ccache *) *io_iterator);
653 err = cc_seq_fetch_NCs_end (in_context, io_iterator);
654 cci_swap_context_functions (in_context);
658 /* ------------------------------------------------------------------------ */
660 cc_int32 __cc_get_name_vector (apiCB *in_context,
664 cc_int32 err = ccNoError;
665 cci_swap_context_functions (in_context);
666 cci_swap_ccache_functions (in_ccache);
667 err = cc_get_name (in_context, in_ccache, out_name);
668 cci_swap_context_functions (in_context);
669 cci_swap_ccache_functions (in_ccache);
673 /* ------------------------------------------------------------------------ */
675 cc_int32 __cc_get_cred_version_vector (apiCB *in_context,
677 cc_int32 *out_version)
679 cc_int32 err = ccNoError;
680 cci_swap_context_functions (in_context);
681 cci_swap_ccache_functions (in_ccache);
682 err = cc_get_cred_version (in_context, in_ccache, out_version);
683 cci_swap_context_functions (in_context);
684 cci_swap_ccache_functions (in_ccache);
688 /* ------------------------------------------------------------------------ */
690 cc_int32 __cc_set_principal_vector (apiCB *in_context,
695 cc_int32 err = ccNoError;
696 cci_swap_context_functions (in_context);
697 cci_swap_ccache_functions (io_ccache);
698 err = cc_set_principal (in_context, io_ccache, in_version, in_principal);
699 cci_swap_context_functions (in_context);
700 cci_swap_ccache_functions (io_ccache);
704 /* ------------------------------------------------------------------------ */
706 cc_int32 __cc_get_principal_vector (apiCB *in_context,
708 char **out_principal)
710 cc_int32 err = ccNoError;
711 cci_swap_context_functions (in_context);
712 cci_swap_ccache_functions (in_ccache);
713 err = cc_get_principal (in_context, in_ccache, out_principal);
714 cci_swap_context_functions (in_context);
715 cci_swap_ccache_functions (in_ccache);
719 /* ------------------------------------------------------------------------ */
721 cc_int32 __cc_store_vector (apiCB *in_context,
723 cred_union in_credentials)
725 cc_int32 err = ccNoError;
726 cci_swap_context_functions (in_context);
727 cci_swap_ccache_functions (io_ccache);
728 err = cc_store (in_context, io_ccache, in_credentials);
729 cci_swap_context_functions (in_context);
730 cci_swap_ccache_functions (io_ccache);
734 /* ------------------------------------------------------------------------ */
736 cc_int32 __cc_remove_cred_vector (apiCB *in_context,
738 cred_union in_credentials)
740 cc_int32 err = ccNoError;
741 cci_swap_context_functions (in_context);
742 cci_swap_ccache_functions (in_ccache);
743 err = cc_remove_cred (in_context, in_ccache, in_credentials);
744 cci_swap_context_functions (in_context);
745 cci_swap_ccache_functions (in_ccache);
749 /* ------------------------------------------------------------------------ */
751 cc_int32 __cc_seq_fetch_creds_begin_vector (apiCB *in_context,
752 const ccache_p *in_ccache,
753 ccache_cit **out_iterator)
755 cc_int32 err = ccNoError;
756 cci_swap_context_functions (in_context);
757 cci_swap_ccache_functions ((ccache_p *)in_ccache);
758 err = cc_seq_fetch_creds_begin (in_context, in_ccache, out_iterator);
759 cci_swap_context_functions (in_context);
760 cci_swap_ccache_functions ((ccache_p *)in_ccache);
764 /* ------------------------------------------------------------------------ */
766 cc_int32 __cc_seq_fetch_creds_next_vector (apiCB *in_context,
767 cred_union **out_creds,
768 ccache_cit *in_iterator)
770 cc_int32 err = ccNoError;
771 cci_swap_context_functions (in_context);
772 cci_swap_credentials_iterator_functions ((ccache_cit_creds *)in_iterator);
773 err = cc_seq_fetch_creds_next (in_context, out_creds, in_iterator);
774 cci_swap_context_functions (in_context);
775 cci_swap_credentials_iterator_functions ((ccache_cit_creds *)in_iterator);
779 /* ------------------------------------------------------------------------ */
781 cc_int32 __cc_seq_fetch_creds_end_vector (apiCB *in_context,
782 ccache_cit **io_iterator)
784 cc_int32 err = ccNoError;
785 cci_swap_context_functions (in_context);
786 cci_swap_credentials_iterator_functions ((ccache_cit_creds *) *io_iterator);
787 err = cc_seq_fetch_creds_end (in_context, io_iterator);
788 cci_swap_context_functions (in_context);
792 /* ------------------------------------------------------------------------ */
794 cc_int32 __cc_free_principal_vector (apiCB *in_context,
797 cc_int32 err = ccNoError;
798 cci_swap_context_functions (in_context);
799 err = cc_free_principal (in_context, io_principal);
800 cci_swap_context_functions (in_context);
804 /* ------------------------------------------------------------------------ */
806 cc_int32 __cc_free_name_vector (apiCB *in_context,
809 cc_int32 err = ccNoError;
810 cci_swap_context_functions (in_context);
811 err = cc_free_name (in_context, io_name);
812 cci_swap_context_functions (in_context);
816 /* ------------------------------------------------------------------------ */
818 cc_int32 __cc_free_creds_vector (apiCB *in_context,
819 cred_union **io_credentials)
821 cc_int32 err = ccNoError;
822 cci_swap_context_functions (in_context);
823 err = cc_free_creds (in_context, io_credentials);
824 cci_swap_context_functions (in_context);
828 /* ------------------------------------------------------------------------ */
830 cc_int32 __cc_free_NC_info_vector (apiCB *in_context,
833 cc_int32 err = ccNoError;
834 cci_swap_context_functions (in_context);
835 err = cc_free_NC_info (in_context, io_info);
836 cci_swap_context_functions (in_context);