diff options
| author | Sam Hartman <hartmans@mit.edu> | 2006-10-21 20:20:30 +0000 |
|---|---|---|
| committer | Sam Hartman <hartmans@mit.edu> | 2006-10-21 20:20:30 +0000 |
| commit | faa68ad5ae7d1504b8be9e8a7bedb0b6e533d3cd (patch) | |
| tree | 314105a642beca7c1117bd24b069719e37ac3b35 /src/lib/ccapi/include | |
| parent | c1c08a16cde35a876a8c7fd36470cc7a1f2536c3 (diff) | |
| download | krb5-faa68ad5ae7d1504b8be9e8a7bedb0b6e533d3cd.tar.gz krb5-faa68ad5ae7d1504b8be9e8a7bedb0b6e533d3cd.tar.xz krb5-faa68ad5ae7d1504b8be9e8a7bedb0b6e533d3cd.zip | |
Delete src/lib/ccapi.
The ccapi shipped in 1.6 will not be based off this code
and will live in src/ccapi.
It will be copied onto the trunk and branch when ready, but this code is being removed before the branch cut.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18731 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/ccapi/include')
| -rw-r--r-- | src/lib/ccapi/include/CredentialsCache.h | 584 | ||||
| -rw-r--r-- | src/lib/ccapi/include/CredentialsCache2.h | 310 | ||||
| -rw-r--r-- | src/lib/ccapi/include/cc_rpc.h | 52 | ||||
| -rw-r--r-- | src/lib/ccapi/include/datastore.h | 182 | ||||
| -rw-r--r-- | src/lib/ccapi/include/generic_lists.h | 102 | ||||
| -rw-r--r-- | src/lib/ccapi/include/marshall.h | 112 | ||||
| -rw-r--r-- | src/lib/ccapi/include/msg.h | 166 | ||||
| -rw-r--r-- | src/lib/ccapi/include/msg_headers.h | 418 | ||||
| -rw-r--r-- | src/lib/ccapi/include/rpc_auth.h | 71 |
9 files changed, 0 insertions, 1997 deletions
diff --git a/src/lib/ccapi/include/CredentialsCache.h b/src/lib/ccapi/include/CredentialsCache.h deleted file mode 100644 index aa800bd2f5..0000000000 --- a/src/lib/ccapi/include/CredentialsCache.h +++ /dev/null @@ -1,584 +0,0 @@ -/* $Copyright: - * - * Copyright 1998-2006 by the Massachusetts Institute of Technology. - * - * All rights reserved. - * - * Export of this software from the United States of America may require a - * specific license from the United States Government. It is the - * responsibility of any person or organization contemplating export to - * obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute - * this software and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice appear in all - * copies and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the name of M.I.T. not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Furthermore if you - * modify this software you must label your software as modified software - * and not distribute it in such a fashion that it might be confused with - * the original MIT software. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Individual source code files are copyright MIT, Cygnus Support, - * OpenVision, Oracle, Sun Soft, FundsXpress, and others. - * - * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira, - * and Zephyr are trademarks of the Massachusetts Institute of Technology - * (MIT). No commercial use of these trademarks may be made without prior - * written permission of MIT. - * - * "Commercial use" means use of a name in a product or other for-profit - * manner. It does NOT prevent a commercial firm from referring to the MIT - * trademarks in order to convey information (although in doing so, - * recognition of their trademark status should be given). - * $ - */ - -/* $Header$ */ - -/* - * Declarations for Credentials Cache API Library - * - * API specification: <http://web.mit.edu/pismere/kerberos/ccache-api-v3.html> - * - * Revision 1: Frank Dabek, 6/4/1998 - * Revision 2: meeroh, 2/24/1999 - * Revision 3: meeroh, 11/12/1999 - * Revision 6: jaltman, 10/27/2004 - * - */ - -#ifndef __CREDENTIALSCACHE__ -#define __CREDENTIALSCACHE__ - -#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__)) -#include <TargetConditionals.h> -#endif - -#if defined(_WIN32) -#include <winsock.h> -#endif - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#if TARGET_OS_MAC -#pragma pack(push,2) -#endif - -#if defined(_WIN32) -#define CCACHE_API __declspec(dllexport) - -#if _INTEGRAL_MAX_BITS >= 64 && _MSC_VER >= 1400 && !defined(_WIN64) && !defined(_USE_32BIT_TIME_T) -#if defined(_TIME_T_DEFINED) || defined(_INC_IO) || defined(_INC_TIME) || defined(_INC_WCHAR) -#error time_t has been defined as a 64-bit integer which is incompatible with Kerberos on this platform. -#endif /* _TIME_T_DEFINED */ -#define _USE_32BIT_TIME_T -#endif -#else -#define CCACHE_API -#endif - -#include <time.h> - -/* - * Constants - */ - -/* API versions */ -enum { - ccapi_version_2 = 2, - ccapi_version_3 = 3, - ccapi_version_4 = 4, - ccapi_version_5 = 5, - ccapi_version_6 = 6, - ccapi_version_max = ccapi_version_6 -}; - -/* Errors */ -enum { - ccNoError = 0, - - ccIteratorEnd = 201, - ccErrBadParam, - ccErrNoMem, - ccErrInvalidContext, - ccErrInvalidCCache, - - ccErrInvalidString, /* 206 */ - ccErrInvalidCredentials, - ccErrInvalidCCacheIterator, - ccErrInvalidCredentialsIterator, - ccErrInvalidLock, - - ccErrBadName, /* 211 */ - ccErrBadCredentialsVersion, - ccErrBadAPIVersion, - ccErrContextLocked, - ccErrContextUnlocked, - - ccErrCCacheLocked, /* 216 */ - ccErrCCacheUnlocked, - ccErrBadLockType, - ccErrNeverDefault, - ccErrCredentialsNotFound, - - ccErrCCacheNotFound, /* 221 */ - ccErrContextNotFound, - ccErrServerUnavailable, - ccErrServerInsecure, - ccErrServerCantBecomeUID, - - ccErrTimeOffsetNotSet, /* 226 */ - ccErrBadInternalMessage, - ccErrNotImplemented -}; - -/* Credentials versions */ -enum cc_credential_versions { - cc_credentials_v4 = 1, - cc_credentials_v5 = 2, - cc_credentials_v4_v5 = 3 -}; - -/* Lock types */ -enum cc_lock_types { - cc_lock_read = 0, - cc_lock_write = 1, - cc_lock_upgrade = 2, - cc_lock_downgrade = 3 -}; - -/* Locking Modes */ -enum cc_lock_modes { - cc_lock_noblock = 0, - cc_lock_block = 1 -}; - -/* - * Basic types - */ - -typedef char cc_int8; -typedef unsigned char cc_uint8; -typedef int cc_int32; -typedef unsigned int cc_uint32; -#if defined (WIN32) -typedef __int64 cc_int64; -typedef unsigned __int64 cc_uint64; -#else -typedef long long cc_int64; -typedef unsigned long long cc_uint64; -#endif -typedef time_t cc_time; -typedef cc_int64 cc_time64; -typedef cc_uint64 cc_handle; - -/* - * API types - */ - -/* Forward declarations */ -struct cc_context_f; -typedef struct cc_context_f cc_context_f; - -struct cc_ccache_f; -typedef struct cc_ccache_f cc_ccache_f; - -struct cc_ccache_iterator_f; -typedef struct cc_ccache_iterator_f cc_ccache_iterator_f; - -struct cc_ccache_iterator_f; -typedef struct cc_credentials_iterator_f cc_credentials_iterator_f; - -struct cc_string_f; -typedef struct cc_string_f cc_string_f; - -struct cc_credentials_f; -typedef struct cc_credentials_f cc_credentials_f; - -/* Credentials types */ - -enum { /* Make sure all of these are multiples of four (for alignment sanity) */ - cc_v4_name_size = 40, - cc_v4_instance_size = 40, - cc_v4_realm_size = 40, - cc_v4_ticket_size = 1254, - cc_v4_key_size = 8 -}; - -enum cc_string_to_key_type { - cc_v4_stk_afs = 0, - cc_v4_stk_des = 1, - cc_v4_stk_columbia_special = 2, - cc_v4_stk_krb5 = 3, - cc_v4_stk_unknown = 4 -}; - -struct cc_credentials_v4_t { - cc_uint32 version; - char principal [cc_v4_name_size]; - char principal_instance [cc_v4_instance_size]; - char service [cc_v4_name_size]; - char service_instance [cc_v4_instance_size]; - char realm [cc_v4_realm_size]; - unsigned char session_key [cc_v4_key_size]; - cc_int32 kvno; - cc_int32 string_to_key_type; - cc_time issue_date; - cc_int32 lifetime; - cc_uint32 address; - cc_int32 ticket_size; - unsigned char ticket [cc_v4_ticket_size]; -}; -typedef struct cc_credentials_v4_t cc_credentials_v4_t; - -struct cc_data { - cc_uint32 type; - cc_uint32 length; - void* data; -}; -typedef struct cc_data cc_data; - -struct cc_credentials_v5_t { - char* client; - char* server; - cc_data keyblock; - cc_time authtime; - cc_time starttime; - cc_time endtime; - cc_time renew_till; - cc_uint32 is_skey; - cc_uint32 ticket_flags; - cc_data** addresses; - cc_data ticket; - cc_data second_ticket; - cc_data** authdata; -}; -typedef struct cc_credentials_v5_t cc_credentials_v5_t; - -struct cc_credentials_union { - cc_int32 version; - union { - cc_credentials_v4_t* credentials_v4; - cc_credentials_v5_t* credentials_v5; - } credentials; -}; -typedef struct cc_credentials_union cc_credentials_union; - -/* Exposed parts */ - -struct cc_context_d { - const cc_context_f *functions; -#if TARGET_OS_MAC - const cc_context_f *otherFunctions; -#endif -}; -typedef struct cc_context_d cc_context_d; -typedef cc_context_d *cc_context_t; - -struct cc_ccache_d { - const cc_ccache_f *functions; -#if TARGET_OS_MAC - const cc_ccache_f *otherFunctions; -#endif -}; -typedef struct cc_ccache_d cc_ccache_d; -typedef cc_ccache_d *cc_ccache_t; - -struct cc_ccache_iterator_d { - const cc_ccache_iterator_f *functions; -#if TARGET_OS_MAC - const cc_ccache_iterator_f *otherFunctions; -#endif -}; -typedef struct cc_ccache_iterator_d cc_ccache_iterator_d; -typedef cc_ccache_iterator_d *cc_ccache_iterator_t; - -struct cc_credentials_iterator_d { - const cc_credentials_iterator_f *functions; -#if TARGET_OS_MAC - const cc_credentials_iterator_f *otherFunctions; -#endif -}; -typedef struct cc_credentials_iterator_d cc_credentials_iterator_d; -typedef cc_credentials_iterator_d *cc_credentials_iterator_t; - -struct cc_string_d { - const char *data; - const cc_string_f *functions; -#if TARGET_OS_MAC - const cc_string_f *otherFunctions; -#endif -}; -typedef struct cc_string_d cc_string_d; -typedef cc_string_d *cc_string_t; - -struct cc_credentials_d { - const cc_credentials_union *data; - const cc_credentials_f *functions; -#if TARGET_OS_MAC - const cc_credentials_f *otherFunctions; -#endif -}; -typedef struct cc_credentials_d cc_credentials_d; -typedef cc_credentials_d *cc_credentials_t; - -/* Function pointer structs */ - -struct cc_context_f { - cc_int32 (*release) (cc_context_t in_context); - - cc_int32 (*get_change_time) (cc_context_t in_context, - cc_time *out_time); - - cc_int32 (*get_default_ccache_name) (cc_context_t in_context, - cc_string_t *out_name); - - cc_int32 (*open_ccache) (cc_context_t in_context, - const char *in_name, - cc_ccache_t *out_ccache); - - cc_int32 (*open_default_ccache) (cc_context_t in_context, - cc_ccache_t *out_ccache); - - cc_int32 (*create_ccache) (cc_context_t in_context, - const char *in_name, - cc_uint32 in_cred_vers, - const char *in_principal, - cc_ccache_t *out_ccache); - - cc_int32 (*create_default_ccache) (cc_context_t in_context, - cc_uint32 in_cred_vers, - const char *in_principal, - cc_ccache_t *out_ccache); - - cc_int32 (*create_new_ccache) (cc_context_t in_context, - cc_uint32 in_cred_vers, - const char *in_principal, - cc_ccache_t *out_ccache); - - cc_int32 (*new_ccache_iterator) (cc_context_t in_context, - cc_ccache_iterator_t *out_iterator); - - cc_int32 (*lock) (cc_context_t in_context, - cc_uint32 in_lock_type, - cc_uint32 in_block); - - cc_int32 (*unlock) (cc_context_t in_cc_context); - - cc_int32 (*compare) (cc_context_t in_cc_context, - cc_context_t in_compare_to_context, - cc_uint32 *out_equal); -}; - -struct cc_ccache_f { - cc_int32 (*release) (cc_ccache_t io_ccache); - - cc_int32 (*destroy) (cc_ccache_t io_ccache); - - cc_int32 (*set_default) (cc_ccache_t io_ccache); - - cc_int32 (*get_credentials_version) (cc_ccache_t in_ccache, - cc_uint32 *in_credentials_version); - - cc_int32 (*get_name) (cc_ccache_t in_ccache, - cc_string_t *out_name); - - cc_int32 (*get_principal) (cc_ccache_t in_ccache, - cc_uint32 in_credentials_version, - cc_string_t *out_principal); - - cc_int32 (*set_principal) (cc_ccache_t io_ccache, - cc_uint32 in_credentials_version, - const char *in_principal); - - cc_int32 (*store_credentials) (cc_ccache_t io_ccache, - const cc_credentials_union *in_credentials_union); - - cc_int32 (*remove_credentials) (cc_ccache_t io_ccache, - cc_credentials_t in_credentials); - - cc_int32 (*new_credentials_iterator) (cc_ccache_t in_ccache, - cc_credentials_iterator_t *out_credentials_iterator); - - cc_int32 (*move) (cc_ccache_t io_source_ccache, - cc_ccache_t io_destination_ccache); - - cc_int32 (*lock) (cc_ccache_t io_ccache, - cc_uint32 in_lock_type, - cc_uint32 in_block); - - cc_int32 (*unlock) (cc_ccache_t io_ccache); - - cc_int32 (*get_last_default_time) (cc_ccache_t in_ccache, - cc_time *out_last_default_time); - - cc_int32 (*get_change_time) (cc_ccache_t in_ccache, - cc_time *out_change_time); - - cc_int32 (*compare) (cc_ccache_t in_ccache, - cc_ccache_t in_compare_to_ccache, - cc_uint32 *out_equal); - - cc_int32 (*get_kdc_time_offset) (cc_ccache_t in_ccache, - cc_int32 in_credentials_version, - cc_time *out_time_offset); - - cc_int32 (*set_kdc_time_offset) (cc_ccache_t io_ccache, - cc_int32 in_credentials_version, - cc_time in_time_offset); - - cc_int32 (*clear_kdc_time_offset) (cc_ccache_t in_ccache, - cc_int32 in_credentials_version); -}; - -struct cc_string_f { - cc_int32 (*release) (cc_string_t in_string); -}; - -struct cc_credentials_f { - cc_int32 (*release) (cc_credentials_t io_credentials); - - cc_int32 (*compare) (cc_credentials_t in_credentials, - cc_credentials_t in_compare_to_credentials, - cc_uint32 *out_equal); -}; - - -struct cc_ccache_iterator_f { - cc_int32 (*release) (cc_ccache_iterator_t io_ccache_iterator); - - cc_int32 (*next) (cc_ccache_iterator_t in_ccache_iterator, - cc_ccache_t *out_ccache); - - cc_int32 (*clone) (cc_ccache_iterator_t in_ccache_iterator, - cc_ccache_iterator_t *out_ccache_iterator); -}; - -struct cc_credentials_iterator_f { - cc_int32 (*release) (cc_credentials_iterator_t io_credentials_iterator); - - cc_int32 (*next) (cc_credentials_iterator_t in_credentials_iterator, - cc_credentials_t *out_credentials); - - cc_int32 (*clone) (cc_credentials_iterator_t in_credentials_iterator, - cc_credentials_iterator_t *out_credentials_iterator); -}; - -/* - * API functions - */ - -CCACHE_API cc_int32 cc_initialize (cc_context_t *out_context, - cc_int32 in_version, - cc_int32 *out_supported_version, - char const **out_vendor); - -/* - * Convenience macros - */ - -#define cc_context_release(context) \ - ((context) -> functions -> release (context)) -#define cc_context_get_change_time(context, time) \ - ((context) -> functions -> get_change_time (context, time)) -#define cc_context_get_default_ccache_name(context, name) \ - ((context) -> functions -> get_default_ccache_name (context, name)) -#define cc_context_open_ccache(context, name, ccache) \ - ((context) -> functions -> open_ccache (context, name, ccache)) -#define cc_context_open_default_ccache(context, ccache) \ - ((context) -> functions -> open_default_ccache (context, ccache)) -#define cc_context_create_ccache(context, name, version, principal, ccache) \ - ((context) -> functions -> create_ccache (context, name, version, principal, ccache)) -#define cc_context_create_default_ccache(context, version, principal, ccache) \ - ((context) -> functions -> create_default_ccache (context, version, principal, ccache)) -#define cc_context_create_new_ccache(context, version, principal, ccache) \ - ((context) -> functions -> create_new_ccache (context, version, principal, ccache)) -#define cc_context_new_ccache_iterator(context, iterator) \ - ((context) -> functions -> new_ccache_iterator (context, iterator)) -#define cc_context_lock(context, type, block) \ - ((context) -> functions -> lock (context, type, block)) -#define cc_context_unlock(context) \ - ((context) -> functions -> unlock (context)) -#define cc_context_compare(context, compare_to, equal) \ - ((context) -> functions -> compare (context, compare_to, equal)) - -#define cc_ccache_release(ccache) \ - ((ccache) -> functions -> release (ccache)) -#define cc_ccache_destroy(ccache) \ - ((ccache) -> functions -> destroy (ccache)) -#define cc_ccache_set_default(ccache) \ - ((ccache) -> functions -> set_default (ccache)) -#define cc_ccache_get_credentials_version(ccache, version) \ - ((ccache) -> functions -> get_credentials_version (ccache, version)) -#define cc_ccache_get_name(ccache, name) \ - ((ccache) -> functions -> get_name (ccache, name)) -#define cc_ccache_get_principal(ccache, version, principal) \ - ((ccache) -> functions -> get_principal (ccache, version, principal)) -#define cc_ccache_set_principal(ccache, version, principal) \ - ((ccache) -> functions -> set_principal (ccache, version, principal)) -#define cc_ccache_store_credentials(ccache, credentials) \ - ((ccache) -> functions -> store_credentials (ccache, credentials)) -#define cc_ccache_remove_credentials(ccache, credentials) \ - ((ccache) -> functions -> remove_credentials (ccache, credentials)) -#define cc_ccache_new_credentials_iterator(ccache, iterator) \ - ((ccache) -> functions -> new_credentials_iterator (ccache, iterator)) -#define cc_ccache_lock(ccache, type, block) \ - ((ccache) -> functions -> lock (ccache, type, block)) -#define cc_ccache_unlock(ccache, unlock) \ - ((ccache) -> functions -> unlock (ccache, unlock)) -#define cc_ccache_get_last_default_time(ccache, time) \ - ((ccache) -> functions -> get_last_default_time (ccache, time)) -#define cc_ccache_get_change_time(ccache, time) \ - ((ccache) -> functions -> get_change_time (ccache, time)) -#define cc_ccache_move(source, destination) \ - ((source) -> functions -> move (source, destination)) -#define cc_ccache_compare(ccache, compare_to, equal) \ - ((ccache) -> functions -> compare (ccache, compare_to, equal)) -#define cc_ccache_get_kdc_time_offset(ccache, version, time) \ - ((ccache) -> functions -> get_kdc_time_offset (version, time)) -#define cc_ccache_set_kdc_time_offset(ccache, version, time) \ - ((ccache) -> functions -> set_kdc_time_offset (version, time)) -#define cc_ccache_clear_kdc_time_offset(ccache, version) \ - ((ccache) -> functions -> clear_kdc_time_offset (version)) - -#define cc_string_release(string) \ - ((string) -> functions -> release (string)) - -#define cc_credentials_release(credentials) \ - ((credentials) -> functions -> release (credentials)) -#define cc_credentials_compare(credentials, compare_to, equal) \ - ((credentials) -> functions -> compare (credentials, compare_to, equal)) - -#define cc_ccache_iterator_release(iterator) \ - ((iterator) -> functions -> release (iterator)) -#define cc_ccache_iterator_next(iterator, ccache) \ - ((iterator) -> functions -> next (iterator, ccache)) -#define cc_ccache_iterator_clone(iterator, new_iter) \ - ((iterator) -> functions -> clone (iterator, new_iter)) - -#define cc_credentials_iterator_release(iterator) \ - ((iterator) -> functions -> release (iterator)) -#define cc_credentials_iterator_next(iterator, credentials) \ - ((iterator) -> functions -> next (iterator, credentials)) -#define cc_credentials_iterator_clone(iterator, new_iter) \ - ((iterator) -> functions -> clone (iterator, new_iter)) - -#if TARGET_OS_MAC -#pragma pack(pop) -#endif - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __CREDENTIALSCACHE__ */ diff --git a/src/lib/ccapi/include/CredentialsCache2.h b/src/lib/ccapi/include/CredentialsCache2.h deleted file mode 100644 index 04b9396c72..0000000000 --- a/src/lib/ccapi/include/CredentialsCache2.h +++ /dev/null @@ -1,310 +0,0 @@ -/* $Copyright: - * - * Copyright 1998-2006 by the Massachusetts Institute of Technology. - * - * All rights reserved. - * - * Export of this software from the United States of America may require a - * specific license from the United States Government. It is the - * responsibility of any person or organization contemplating export to - * obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute - * this software and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice appear in all - * copies and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the name of M.I.T. not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Furthermore if you - * modify this software you must label your software as modified software - * and not distribute it in such a fashion that it might be confused with - * the original MIT software. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Individual source code files are copyright MIT, Cygnus Support, - * OpenVision, Oracle, Sun Soft, FundsXpress, and others. - * - * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira, - * and Zephyr are trademarks of the Massachusetts Institute of Technology - * (MIT). No commercial use of these trademarks may be made without prior - * written permission of MIT. - * - * "Commercial use" means use of a name in a product or other for-profit - * manner. It does NOT prevent a commercial firm from referring to the MIT - * trademarks in order to convey information (although in doing so, - * recognition of their trademark status should be given). - * $ - */ -/* - * This is backwards compatibility for CCache API v2 clients to be able to run - * against the CCache API v3 library - */ - -#ifndef __CREDENTIALSCACHE2__ -#define __CREDENTIALSCACHE2__ - -#include "CredentialsCache.h" - -#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__)) -#include <TargetConditionals.h> -#endif - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#if TARGET_OS_MAC -#pragma pack(push,2) -#endif - -/* Some old types get directly mapped to new types */ - -typedef cc_context_d apiCB; -typedef cc_ccache_d ccache_p; -typedef cc_credentials_iterator_d ccache_cit_creds; -typedef cc_ccache_iterator_d ccache_cit_ccache; -typedef cc_data cc_data_compat; -typedef cc_int32 cc_cred_vers; -typedef cc_int32 cc_result; - -/* This doesn't exist in API v3 */ -typedef cc_uint32 cc_flags; - -/* Credentials types are visible to the caller so we have to keep binary compatibility */ - -typedef struct cc_credentials_v5_compat { - char* client; - char* server; - cc_data_compat keyblock; - cc_time authtime; - cc_time starttime; - cc_time endtime; - cc_time renew_till; - cc_uint32 is_skey; - cc_uint32 ticket_flags; - cc_data_compat** addresses; - cc_data_compat ticket; - cc_data_compat second_ticket; - cc_data_compat** authdata; -} cc_credentials_v5_compat; - -enum { - MAX_V4_CRED_LEN = 1250 -}; - -enum { - KRB_NAME_SZ = 40, - KRB_INSTANCE_SZ = 40, - KRB_REALM_SZ = 40 -}; - -typedef struct cc_credentials_v4_compat { - unsigned char kversion; - char principal[KRB_NAME_SZ+1]; - char principal_instance[KRB_INSTANCE_SZ+1]; - char service[KRB_NAME_SZ+1]; - char service_instance[KRB_INSTANCE_SZ+1]; - char realm[KRB_REALM_SZ+1]; - unsigned char session_key[8]; - cc_int32 kvno; - cc_int32 str_to_key; - long issue_date; - cc_int32 lifetime; - cc_uint32 address; - cc_int32 ticket_sz; - unsigned char ticket[MAX_V4_CRED_LEN]; - unsigned long oops; -} cc_credentials_v4_compat; - -typedef union cred_ptr_union_compat { - cc_credentials_v4_compat* pV4Cred; - cc_credentials_v5_compat* pV5Cred; -} cred_ptr_union_compat; - -typedef struct cred_union { - cc_int32 cred_type; // cc_cred_vers - cred_ptr_union_compat cred; -} cred_union; - -/* NC info structure is gone in v3 */ - -struct infoNC { - char* name; - char* principal; - cc_int32 vers; -}; - -typedef struct infoNC infoNC; - -/* Some old type names */ - -typedef cc_credentials_v4_compat V4Cred_type; -typedef cc_credentials_v5_compat cc_creds; -struct ccache_cit; -typedef struct ccache_cit ccache_cit; - -enum { - CC_API_VER_2 = ccapi_version_2 -}; - -enum { - CC_NOERROR, - CC_BADNAME, - CC_NOTFOUND, - CC_END, - CC_IO, - CC_WRITE, - CC_NOMEM, - CC_FORMAT, - CC_LOCKED, - CC_BAD_API_VERSION, - CC_NO_EXIST, - CC_NOT_SUPP, - CC_BAD_PARM, - CC_ERR_CACHE_ATTACH, - CC_ERR_CACHE_RELEASE, - CC_ERR_CACHE_FULL, - CC_ERR_CRED_VERSION -}; - -enum { - CC_CRED_UNKNOWN, - CC_CRED_V4, - CC_CRED_V5, - CC_CRED_MAX -}; - -enum { - CC_LOCK_UNLOCK = 1, - CC_LOCK_READER = 2, - CC_LOCK_WRITER = 3, - CC_LOCK_NOBLOCK = 16 -}; - -CCACHE_API cc_int32 cc_shutdown ( - apiCB** ioContext); - -CCACHE_API cc_int32 cc_get_NC_info ( - apiCB* inContext, - infoNC*** outInfo); - -CCACHE_API cc_int32 cc_get_change_time ( - apiCB* inContext, - cc_time* outTime); - -CCACHE_API cc_int32 cc_open ( - apiCB* inContext, - const char* inName, - cc_int32 inVersion, - cc_uint32 inFlags, - ccache_p** outCCache); - -CCACHE_API cc_int32 cc_create ( - apiCB* inContext, - const char* inName, - const char* inPrincipal, - cc_int32 inVersion, - cc_uint32 inFlags, - ccache_p** outCCache); - -CCACHE_API cc_int32 cc_close ( - apiCB* inContext, - ccache_p** ioCCache); - -CCACHE_API cc_int32 cc_destroy ( - apiCB* inContext, - ccache_p** ioCCache); - -CCACHE_API cc_int32 cc_seq_fetch_NCs_begin ( - apiCB* inContext, - ccache_cit** outIterator); - -CCACHE_API cc_int32 cc_seq_fetch_NCs_next ( - apiCB* inContext, - ccache_p** outCCache, - ccache_cit* inIterator); - -CCACHE_API cc_int32 cc_seq_fetch_NCs_end ( - apiCB* inContext, - ccache_cit** ioIterator); - -CCACHE_API cc_int32 cc_get_name ( - apiCB* inContext, - ccache_p* inCCache, - char** outName); - -CCACHE_API cc_int32 cc_get_cred_version ( - apiCB* inContext, - ccache_p* inCCache, - cc_int32* outVersion); - -CCACHE_API cc_int32 cc_set_principal ( - apiCB* inContext, - ccache_p* inCCache, - cc_int32 inVersion, - char* inPrincipal); - -CCACHE_API cc_int32 cc_get_principal ( - apiCB* inContext, - ccache_p* inCCache, - char** outPrincipal); - -CCACHE_API cc_int32 cc_store ( - apiCB* inContext, - ccache_p* inCCache, - cred_union inCredentials); - -CCACHE_API cc_int32 cc_remove_cred ( - apiCB* inContext, - ccache_p* inCCache, - cred_union inCredentials); - -CCACHE_API cc_int32 cc_seq_fetch_creds_begin ( - apiCB* inContext, - const ccache_p* inCCache, - ccache_cit** outIterator); - -CCACHE_API cc_int32 cc_seq_fetch_creds_next ( - apiCB* inContext, - cred_union** outCreds, - ccache_cit* inIterator); - -CCACHE_API cc_int32 cc_seq_fetch_creds_end ( - apiCB* inContext, - ccache_cit** ioIterator); - -CCACHE_API cc_int32 cc_free_principal ( - apiCB* inContext, - char** ioPrincipal); - -CCACHE_API cc_int32 cc_free_name ( - apiCB* inContext, - char** ioName); - -CCACHE_API cc_int32 cc_free_creds ( - apiCB* inContext, - cred_union** creds); - -CCACHE_API cc_int32 cc_free_NC_info ( - apiCB* inContext, - infoNC*** ioInfo); - -CCACHE_API cc_int32 cc_lock_request( - apiCB* inContext, - const ccache_p* inCCache, - const cc_int32 lock_type); - -#if TARGET_OS_MAC -#pragma pack(pop) -#endif - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __CREDENTIALSCACHE2__ */ diff --git a/src/lib/ccapi/include/cc_rpc.h b/src/lib/ccapi/include/cc_rpc.h deleted file mode 100644 index 0f14724b90..0000000000 --- a/src/lib/ccapi/include/cc_rpc.h +++ /dev/null @@ -1,52 +0,0 @@ -/* $Copyright:
- *
- * Copyright 2004-2006 by the Massachusetts Institute of Technology.
- *
- * All rights reserved.
- *
- * Export of this software from the United States of America may require a
- * specific license from the United States Government. It is the
- * responsibility of any person or organization contemplating export to
- * obtain such a license before exporting.
- *
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute
- * this software and its documentation for any purpose and without fee is
- * hereby granted, provided that the above copyright notice appear in all
- * copies and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of M.I.T. not be
- * used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. Furthermore if you
- * modify this software you must label your software as modified software
- * and not distribute it in such a fashion that it might be confused with
- * the original MIT software. M.I.T. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Individual source code files are copyright MIT, Cygnus Support,
- * OpenVision, Oracle, Sun Soft, FundsXpress, and others.
- *
- * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira,
- * and Zephyr are trademarks of the Massachusetts Institute of Technology
- * (MIT). No commercial use of these trademarks may be made without prior
- * written permission of MIT.
- *
- * "Commercial use" means use of a name in a product or other for-profit
- * manner. It does NOT prevent a commercial firm from referring to the MIT
- * trademarks in order to convey information (although in doing so,
- * recognition of their trademark status should be given).
- * $
- */
-
-
-#ifndef __CC_RPC_H__
-#define __CC_RPC_H__
-
-#include "msg.h"
-
-cc_int32 cci_perform_rpc(cc_msg_t *request, cc_msg_t **response);
-
-#endif /* __CC_RPC_H__ */
diff --git a/src/lib/ccapi/include/datastore.h b/src/lib/ccapi/include/datastore.h deleted file mode 100644 index 7bb8b093d8..0000000000 --- a/src/lib/ccapi/include/datastore.h +++ /dev/null @@ -1,182 +0,0 @@ -/* $Copyright: - * - * Copyright 2004-2006 by the Massachusetts Institute of Technology. - * - * All rights reserved. - * - * Export of this software from the United States of America may require a - * specific license from the United States Government. It is the - * responsibility of any person or organization contemplating export to - * obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute - * this software and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice appear in all - * copies and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the name of M.I.T. not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Furthermore if you - * modify this software you must label your software as modified software - * and not distribute it in such a fashion that it might be confused with - * the original MIT software. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Individual source code files are copyright MIT, Cygnus Support, - * OpenVision, Oracle, Sun Soft, FundsXpress, and others. - * - * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira, - * and Zephyr are trademarks of the Massachusetts Institute of Technology - * (MIT). No commercial use of these trademarks may be made without prior - * written permission of MIT. - * - * "Commercial use" means use of a name in a product or other for-profit - * manner. It does NOT prevent a commercial firm from referring to the MIT - * trademarks in order to convey information (although in doing so, - * recognition of their trademark status should be given). - * $ - */ -/* - * Prototypes and data structures for datastore. - * - */ - - -#ifndef __CCDATASTOREH__ -#define __CCDATASTOREH__ - -#include "CredentialsCache.h" -#include "rpc_auth.h" -#include "generic_lists.h" - -struct cc_context_iterate_t { - cc_context_list_node_t* next; -}; -typedef struct cc_context_iterate_t cc_context_iterate_t; - -struct cc_ccache_iterate_t { - cc_ccache_list_node_t* next; -}; -typedef struct cc_ccache_iterate_t cc_ccache_iterate_t; - -struct cc_credentials_iterate_t { - cc_credentials_list_node_t* next; -}; -typedef struct cc_credentials_iterate_t cc_credentials_iterate_t; - -struct cc_lock { - cc_uint32 read_locks; /* count of read locks (>= 0) */ - cc_uint32 write_locks; /* count of write locks (0 or 1) */ - void * platform_data; /* platform specific implementation data */ -}; -typedef struct cc_lock cc_lock_t; - - -struct cc_server_context_t { - cc_ccache_list_head_t* ccaches; /*our ccaches*/ - cc_generic_list_head_t* active_iterators; /*active ccache iterators*/ - cc_int32 api_version; /*Version our client passed in on init (ccapi_version_X) */ - cc_auth_info_t* auth_info; /*auth info passed in from RPC*/ - cc_session_info_t* session_info; /*session info passed in from RPC*/ - cc_time64 changed; /*date of last change to this context*/ - cc_int32 error; /*last error code*/ - cc_lock_t locks; /*are we locked?*/ -}; -typedef struct cc_server_context_t cc_server_context_t; - -struct cc_server_ccache_t { - char* name; /*name of this ccache*/ - char* principal_v4; /*v4 principal associated with this cache*/ - char* principal_v5; /*v5 principal associated with this cache*/ - cc_uint32 versions; /*versions of creds supported (from cc_credentials enum in CredentialsCache.h)*/ - cc_time64 changed; /*date of last change to ccache*/ - cc_int32 kdc_set; /*is the KDC time offset initialized?*/ - cc_time64 kdc_offset; /*offset of our clock relative kdc*/ - cc_time64 last_default; /*the last date when we were default*/ - cc_int32 is_default; /*is this the default cred on this ccache?*/ - cc_generic_list_head_t* active_iterators; /*iterators which clients have opened on this cache*/ - cc_credentials_list_head_t* creds; /*list of creds stored in this ccache*/ - cc_server_context_t* mycontext; /*context to which I belong*/ - cc_lock_t locks; /*are we locked?*/ -}; -typedef struct cc_server_ccache_t cc_server_ccache_t; - -struct cc_server_credentials_t { - cc_int32 is_default; /*Are we the default cred? (first in list)*/ - cc_credentials_union creds; -}; -typedef struct cc_server_credentials_t cc_server_credentials_t; - - -/*Note: cci means Credential Cache Internal, to differentiate from exported API macros*/ - -cc_int32 ccs_context_iterate_has_next(struct cc_context_iterate_t *iterate); -cc_int32 ccs_context_iterate_next(struct cc_context_iterate_t *iterate, cc_context_list_node_t**); - -cc_int32 ccs_ccache_iterate_has_next(struct cc_ccache_iterate_t *iterate); -cc_int32 ccs_ccache_iterate_next(struct cc_ccache_iterate_t *iterate, cc_ccache_list_node_t**); - -cc_int32 ccs_credentials_iterate_has_next(cc_credentials_iterate_t *iterate); -cc_int32 ccs_credentials_iterate_next(cc_credentials_iterate_t *iterate, cc_credentials_list_node_t **); - -cc_int32 ccs_context_list_new(cc_context_list_head_t**); -cc_int32 ccs_context_list_append(cc_context_list_head_t *head, cc_server_context_t *data, cc_context_list_node_t**); -cc_int32 ccs_context_list_prepend(cc_context_list_head_t *head, cc_server_context_t *data, cc_context_list_node_t**); -cc_int32 ccs_context_list_remove_element(cc_context_list_head_t* head, cc_context_list_node_t* rem); -cc_int32 ccs_context_list_iterator(cc_context_list_head_t *head, struct cc_context_iterate_t**); -cc_int32 ccs_context_free_iterator(struct cc_context_iterate_t *iterator); -cc_int32 ccs_context_list_destroy(cc_context_list_head_t* head) ; -cc_int32 ccs_context_list_copy(cc_context_list_head_t* head, cc_context_list_head_t**); - -cc_int32 ccs_ccache_list_new(cc_ccache_list_head_t**); -cc_int32 ccs_ccache_list_append(cc_ccache_list_head_t *head, cc_server_ccache_t *data, cc_ccache_list_node_t**); -cc_int32 ccs_ccache_list_prepend(cc_ccache_list_head_t *head, cc_server_ccache_t *data, cc_ccache_list_node_t**); -cc_int32 ccs_ccache_list_remove_element(cc_ccache_list_head_t* head, cc_ccache_list_node_t* rem); -cc_int32 ccs_ccache_list_iterator(cc_ccache_list_head_t *head, struct cc_ccache_iterate_t**); -cc_int32 ccs_ccache_free_iterator(struct cc_ccache_iterate_t *iterator); -cc_int32 ccs_ccache_list_destroy(cc_ccache_list_head_t* head) ; -cc_int32 ccs_ccache_list_copy(cc_ccache_list_head_t* head, cc_ccache_list_head_t**); - - -cc_int32 ccs_credentials_list_new(cc_credentials_list_head_t**); -cc_int32 ccs_credentials_list_append(cc_credentials_list_head_t *head, cc_server_credentials_t *data, cc_credentials_list_node_t**); -cc_int32 ccs_credentials_list_prepend(cc_credentials_list_head_t *head, cc_server_credentials_t *data, cc_credentials_list_node_t**); -cc_int32 ccs_credentials_list_remove_element(cc_credentials_list_head_t* head, cc_credentials_list_node_t* rem); -cc_int32 ccs_credentials_list_iterator(cc_credentials_list_head_t *head, cc_credentials_iterate_t**); -cc_int32 ccs_credentials_free_iterator(cc_credentials_iterate_t* iterator); -cc_int32 ccs_credentials_list_destroy(cc_credentials_list_head_t* head) ; -cc_int32 ccs_credentials_list_copy(cc_credentials_list_head_t* head, cc_credentials_list_head_t**) ; - - -cc_int32 ccs_context_new(int api_version, cc_auth_info_t* auth_info, cc_session_info_t* session_info, cc_server_context_t** ) ; -cc_int32 ccs_context_get_default_ccache_name(cc_server_context_t* ctx, char **); -cc_int32 ccs_context_find_ccache(cc_server_context_t* ctx, char *name, cc_server_ccache_t**); -cc_int32 ccs_context_open_ccache(cc_server_context_t* ctx, char *name, cc_server_ccache_t** ); -cc_int32 ccs_context_create_ccache(cc_server_context_t* ctx, char *name, int creds_version, char *principal, cc_server_ccache_t**); -cc_int32 ccs_context_create_default_ccache(cc_server_context_t* ctx, int creds_version, char *principal, cc_server_ccache_t**); -cc_int32 ccs_context_ccache_iterator(cc_server_context_t* ctx, cc_ccache_iterate_t**); -cc_int32 ccs_context_compare(cc_server_context_t* a, cc_server_context_t* b); -cc_int32 ccs_context_destroy(cc_server_context_t* ctx); -cc_int32 ccs_context_rem_ccache(cc_server_context_t* ctx, cc_server_ccache_t* ccache); - -cc_int32 ccs_ccache_new(char *name, char *principal, int cred_vers, cc_server_ccache_t**); -cc_int32 ccs_ccache_check_version(const cc_server_ccache_t *ccache, const cc_credentials_union* creds, cc_uint32* compat); -cc_int32 ccs_ccache_check_principal(const cc_server_ccache_t *ccache, const cc_credentials_union* creds, cc_uint32* compat); -cc_int32 ccs_ccache_store_creds(cc_server_ccache_t *ccache, const cc_credentials_union* credentials); -cc_int32 ccs_ccache_rem_creds(cc_server_ccache_t *ccache, const cc_credentials_union* credentials); -cc_int32 ccs_ccache_move(cc_server_ccache_t *source, cc_server_ccache_t* destination); -cc_int32 ccs_ccache_get_kdc_time_offset(cc_server_ccache_t* ccache, cc_time64* offset); -cc_int32 ccs_ccache_set_kdc_time_offset(cc_server_ccache_t* ccache, cc_time64 offset); -cc_int32 ccs_ccache_clear_kdc_time_offset(cc_server_ccache_t* ccache); -cc_int32 ccs_ccache_new_iterator(cc_server_ccache_t* ccache, cc_credentials_iterate_t** iterator); -cc_int32 ccs_ccache_get_principal(cc_server_ccache_t* ccache, cc_int32 version, char ** principal); -cc_int32 ccs_ccache_set_principal(cc_server_ccache_t* ccache, cc_int32 version, char * principal); -cc_int32 ccs_ccache_free_principal(char * principal); -cc_int32 ccs_ccache_destroy(cc_server_ccache_t* ccache); -void ccs_ccache_changed(cc_server_ccache_t* ccache); -cc_int32 ccs_ccache_compare(cc_server_ccache_t* ccache1, cc_server_ccache_t* ccache2, cc_uint32 *result); -#endif /*__CCDATASTOREH__*/ diff --git a/src/lib/ccapi/include/generic_lists.h b/src/lib/ccapi/include/generic_lists.h deleted file mode 100644 index 93636da388..0000000000 --- a/src/lib/ccapi/include/generic_lists.h +++ /dev/null @@ -1,102 +0,0 @@ -/* $Copyright:
- *
- * Copyright 2004-2006 by the Massachusetts Institute of Technology.
- *
- * All rights reserved.
- *
- * Export of this software from the United States of America may require a
- * specific license from the United States Government. It is the
- * responsibility of any person or organization contemplating export to
- * obtain such a license before exporting.
- *
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute
- * this software and its documentation for any purpose and without fee is
- * hereby granted, provided that the above copyright notice appear in all
- * copies and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of M.I.T. not be
- * used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. Furthermore if you
- * modify this software you must label your software as modified software
- * and not distribute it in such a fashion that it might be confused with
- * the original MIT software. M.I.T. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Individual source code files are copyright MIT, Cygnus Support,
- * OpenVision, Oracle, Sun Soft, FundsXpress, and others.
- *
- * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira,
- * and Zephyr are trademarks of the Massachusetts Institute of Technology
- * (MIT). No commercial use of these trademarks may be made without prior
- * written permission of MIT.
- *
- * "Commercial use" means use of a name in a product or other for-profit
- * manner. It does NOT prevent a commercial firm from referring to the MIT
- * trademarks in order to convey information (although in doing so,
- * recognition of their trademark status should be given).
- * $
- */
-/*
- * Prototypes and data structures for datastore.
- *
- */
-
-
-#ifndef __CC_GENERIC_LISTS_H_
-#define __CC_GENERIC_LISTS_H_
-
-enum cc_list_type {
- cc_generic_list = 0,
- cc_context_list,
- cc_cache_list,
- cc_credentials_list
-};
-
-struct cc_generic_list_node_t {
- cc_uint8* data;
- cc_uint32 len;
- struct cc_generic_list_node_t* next;
- struct cc_generic_list_node_t* prev;
-};
-typedef struct cc_generic_list_node_t cc_generic_list_node_t;
-
-struct cc_generic_list_head_t {
- enum cc_list_type type;
- cc_generic_list_node_t* head;
- cc_generic_list_node_t* tail;
-};
-typedef struct cc_generic_list_head_t cc_generic_list_head_t;
-
-
-struct cc_generic_iterate_t {
- cc_generic_list_node_t* next;
-};
-typedef struct cc_generic_iterate_t cc_generic_iterate_t;
-
-typedef cc_generic_list_head_t cc_context_list_head_t;
-typedef cc_generic_list_node_t cc_context_list_node_t;
-
-typedef cc_generic_list_head_t cc_ccache_list_head_t;
-typedef cc_generic_list_node_t cc_ccache_list_node_t;
-
-typedef cc_generic_list_head_t cc_credentials_list_head_t;
-typedef cc_generic_list_node_t cc_credentials_list_node_t;
-
-cc_int32 cci_generic_iterate_has_next(cc_generic_iterate_t *iterate);
-cc_int32 cci_generic_iterate_next(cc_generic_iterate_t *iterate, cc_generic_list_node_t**);
-
-cc_int32 cci_generic_list_new(cc_generic_list_head_t **);
-cc_int32 cci_generic_list_append(cc_generic_list_head_t *head, void *data, cc_uint32 len, cc_generic_list_node_t**);
-cc_int32 cci_generic_list_prepend(cc_generic_list_head_t *head, void *data, cc_uint32 len, cc_generic_list_node_t**);
-cc_int32 cci_generic_list_remove_element(cc_generic_list_head_t* head, cc_generic_list_node_t* rem);
-cc_int32 cci_generic_free_element(cc_generic_list_node_t* node);
-cc_int32 cci_generic_list_destroy(cc_generic_list_head_t* head);
-cc_int32 cci_generic_list_copy(cc_generic_list_head_t* head, cc_generic_list_head_t**);
-cc_int32 cci_generic_list_iterator(cc_generic_list_head_t *head, cc_generic_iterate_t**);
-cc_int32 cci_generic_free_iterator(cc_generic_iterate_t* iterator);
-
-#endif /* __CC_GENERIC_LISTS_H_ */
diff --git a/src/lib/ccapi/include/marshall.h b/src/lib/ccapi/include/marshall.h deleted file mode 100644 index ca6b12e968..0000000000 --- a/src/lib/ccapi/include/marshall.h +++ /dev/null @@ -1,112 +0,0 @@ -/* $Copyright: - * - * Copyright 2004-2006 by the Massachusetts Institute of Technology. - * - * All rights reserved. - * - * Export of this software from the United States of America may require a - * specific license from the United States Government. It is the - * responsibility of any person or organization contemplating export to - * obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute - * this software and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice appear in all - * copies and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the name of M.I.T. not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Furthermore if you - * modify this software you must label your software as modified software - * and not distribute it in such a fashion that it might be confused with - * the original MIT software. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Individual source code files are copyright MIT, Cygnus Support, - * OpenVision, Oracle, Sun Soft, FundsXpress, and others. - * - * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira, - * and Zephyr are trademarks of the Massachusetts Institute of Technology - * (MIT). No commercial use of these trademarks may be made without prior - * written permission of MIT. - * - * "Commercial use" means use of a name in a product or other for-profit - * manner. It does NOT prevent a commercial firm from referring to the MIT - * trademarks in order to convey information (although in doing so, - * recognition of their trademark status should be given). - * $ - */ - -struct cc_flat_data { - cc_uint32 type; - cc_uint32 length; - cc_uint32 data; -}; -typedef struct cc_flat_data cc_flat_data; - -#define FLAT_CREDS_V5_VERSION 1 -struct cci_flat_creds_v5 { - cc_uint32 version; /* version of this structure */ - cc_flat_data client; - cc_flat_data server; - cc_flat_data keyblock; - cc_time64 authtime; - cc_time64 starttime; - cc_time64 endtime; - cc_time64 renew_till; - cc_uint32 is_skey; - cc_uint32 ticket_flags; - cc_uint32 address_count; - cc_uint32 addresses; /* offset to array */ - cc_flat_data ticket; - cc_flat_data second_ticket; - cc_uint32 authdata_count; - cc_uint32 authdata; /* offset to array */ -}; -typedef struct cci_flat_creds_v5 cci_flat_creds_v5_t; - -struct cci_flat_creds_v4 { - cc_uint32 version; - char principal [cc_v4_name_size]; - char principal_instance [cc_v4_instance_size]; - char service [cc_v4_name_size]; - char service_instance [cc_v4_instance_size]; - char realm [cc_v4_realm_size]; - unsigned char session_key [cc_v4_key_size]; - cc_int32 kvno; - cc_int32 string_to_key_type; - cc_time64 issue_date; - cc_int32 lifetime; - cc_uint32 address; - cc_int32 ticket_size; - unsigned char ticket [cc_v4_ticket_size]; -}; -typedef struct cci_flat_creds_v4 cci_flat_creds_v4_t; - -cc_int32 -cci_creds_v4_marshall( cc_credentials_v4_t * creds, - char ** flat, - cc_uint32 * len); - -cc_int32 -cci_creds_v4_unmarshall( char * flat, - cc_uint32 len, - cc_credentials_union * creds); - -cc_int32 -cci_creds_v5_marshall( cc_credentials_v5_t * creds, - char ** pflat, - cc_uint32 * plen); - -cc_int32 -cci_creds_v5_unmarshall( char * flat, - cc_uint32 len, - cc_credentials_union * creds_union); - - - - diff --git a/src/lib/ccapi/include/msg.h b/src/lib/ccapi/include/msg.h deleted file mode 100644 index 1682811c01..0000000000 --- a/src/lib/ccapi/include/msg.h +++ /dev/null @@ -1,166 +0,0 @@ -/* $Copyright: - * - * Copyright 2004-2006 by the Massachusetts Institute of Technology. - * - * All rights reserved. - * - * Export of this software from the United States of America may require a - * specific license from the United States Government. It is the - * responsibility of any person or organization contemplating export to - * obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute - * this software and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice appear in all - * copies and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the name of M.I.T. not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Furthermore if you - * modify this software you must label your software as modified software - * and not distribute it in such a fashion that it might be confused with - * the original MIT software. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Individual source code files are copyright MIT, Cygnus Support, - * OpenVision, Oracle, Sun Soft, FundsXpress, and others. - * - * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira, - * and Zephyr are trademarks of the Massachusetts Institute of Technology - * (MIT). No commercial use of these trademarks may be made without prior - * written permission of MIT. - * - * "Commercial use" means use of a name in a product or other for-profit - * manner. It does NOT prevent a commercial firm from referring to the MIT - * trademarks in order to convey information (although in doing so, - * recognition of their trademark status should be given). - * $ - */ - -/* - * Verifiable, extensible message format. - * - * Format: - * <size of header block (header_len)> - * <size of *entire* message, including previous field (flat_len)> - * <message type (type)> - * <type specific header (header)> - * <magic number (magic)> - * <data blob 1 length> - * <data blob 1> - * <data blob 2 length> - * <data blob 2> - * ... - * <magic number (magic)> - * - * If the header has variable length data it is included in the data blobs. - * The header field has the offset from the beginning of the message of the 1st - * byte of the data and the length of the data. - */ - -#ifndef __CC_MSG_H__ -#define __CC_MSG_H__ - -#include "CredentialsCache.h" -#include "generic_lists.h" - -#if TARGET_OS_MAC -#define htonll(x) OSSwapHostToBigInt64(x) -#define ntohll(x) OSSwapBigToHostInt64(x) -#endif - -struct cc_msg_t { - cc_uint32 type; /*type of message*/ - cc_uint8 *flat; /*flattened representation of this message*/ - cc_uint8 *header; /*fixed length header determined by message type*/ - cc_uint32 flat_len; /*length of flat rep*/ - cc_uint32 header_len; /*length of header*/ - cc_uint32 magic; /*magic number for verification purposes*/ - cc_generic_list_head_t* data_blobs; /*variable length data*/ -}; -typedef struct cc_msg_t cc_msg_t; - -/*Types of messages*/ -enum { - ccmsg_ACK, - ccmsg_NACK, - ccmsg_INIT, - ccmsg_CTX_RELEASE, - ccmsg_CTX_GET_CHANGE_TIME, - ccmsg_CTX_GET_DEFAULT_CCACHE_NAME, - ccmsg_CTX_CCACHE_OPEN, - ccmsg_CTX_CCACHE_OPEN_DEFAULT, - ccmsg_CTX_CCACHE_CREATE, - ccmsg_CTX_CCACHE_CREATE_DEFAULT, - ccmsg_CTX_CCACHE_CREATE_UNIQUE, - ccmsg_CTX_NEW_CCACHE_ITERATOR, - ccmsg_CTX_LOCK, - ccmsg_CTX_UNLOCK, - ccmsg_CTX_COMPARE, - ccmsg_CCACHE_RELEASE, - ccmsg_CCACHE_DESTROY, - ccmsg_CCACHE_SET_DEFAULT, - ccmsg_CCACHE_GET_CREDS_VERSION, - ccmsg_CCACHE_GET_NAME, - ccmsg_CCACHE_GET_PRINCIPAL, - ccmsg_CCACHE_SET_PRINCIPAL, - ccmsg_CCACHE_NEW_CREDS_ITERATOR, - ccmsg_CCACHE_STORE_CREDS, - ccmsg_CCACHE_REM_CREDS, - ccmsg_CCACHE_MOVE, - ccmsg_CCACHE_LOCK, - ccmsg_CCACHE_UNLOCK, - ccmsg_CCACHE_GET_LAST_DEFAULT_TIME, - ccmsg_CCACHE_GET_CHANGE_TIME, - ccmsg_CCACHE_COMPARE, - ccmsg_CCACHE_GET_KDC_TIME_OFFSET, - ccmsg_CCACHE_SET_KDC_TIME_OFFSET, - ccmsg_CCACHE_CLEAR_KDC_TIME_OFFSET, - ccmsg_CCACHE_ITERATOR_RELEASE, - ccmsg_CCACHE_ITERATOR_NEXT, - ccmsg_CCACHE_ITERATOR_CLONE, - ccmsg_CREDS_ITERATOR_RELEASE, - ccmsg_CREDS_ITERATOR_NEXT, - ccmsg_CREDS_ITERATOR_CLONE -}; - -#define CC_MSG_MAX_SIZE 1073741824 /*2^30*/ -#define CC_MSG_MAX_TYPE ccmsg_CREDS_ITERATOR_CLONE -#define BLOB_LEN (sizeof(cc_uint32)) -#define MAGIC_DATA_LEN (sizeof(cc_uint32)) -#define MAGIC_HEAD_LEN (sizeof(cc_uint32)) - -cc_int32 cci_msg_new(cc_uint32 type, cc_msg_t** msgpp); -cc_int32 cci_msg_calc_size(cc_msg_t* msg, cc_uint32 * sizep); -cc_int32 cci_msg_calc_header_size(cc_msg_t* msg, cc_uint32 * sizep); -cc_int32 cci_msg_add_data_blob(cc_msg_t* msg, void *data, cc_uint32 len, cc_uint32 * sizep); -cc_int32 cci_msg_add_header(cc_msg_t* msg, void *header, cc_uint32 header_len); -cc_int32 cci_msg_calc_blob_pos(cc_msg_t* msg, void *data, cc_uint32 len, cc_uint32 * sizep); -cc_int32 cci_msg_flatten(cc_msg_t* msg, void **); -cc_int32 cci_msg_calc_magic(void *flat, cc_uint32 flat_len, cc_uint32 * sizep); -cc_int32 cci_msg_verify(void* flat, cc_uint32 flat_len, cc_uint32 * sizep); -cc_int32 cci_msg_unflatten(void *flat, cc_uint32 flat_len, cc_msg_t** msgpp); -cc_int32 cci_msg_retrieve_blob(cc_msg_t* msg, cc_uint32 blob_offset, cc_uint32 blob_len, char **); -cc_int32 cci_msg_destroy(cc_msg_t* msg); - -/* Add missing byte swapping macros for 64-bit values */ -#ifdef MAC -#define htonll(x) OSSwapHostToBigInt64(x) -#define ntohll(x) OSSwapBigToHostInt64(x) -#else -#ifdef _WIN32 -#ifdef _M_IX86 -#define htonll(x) _byteswap_uint64(x) -#define ntohll(x) _byteswap_uint64(x) -#else -#define htonll(x) (x) -#define ntohll(x) (x) -#endif -#endif -#endif - -#endif /*__CC_MSG_H__*/ diff --git a/src/lib/ccapi/include/msg_headers.h b/src/lib/ccapi/include/msg_headers.h deleted file mode 100644 index b5a9acd6d5..0000000000 --- a/src/lib/ccapi/include/msg_headers.h +++ /dev/null @@ -1,418 +0,0 @@ -/* $Copyright: - * - * Copyright 2004-2006 by the Massachusetts Institute of Technology. - * - * All rights reserved. - * - * Export of this software from the United States of America may require a - * specific license from the United States Government. It is the - * responsibility of any person or organization contemplating export to - * obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute - * this software and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice appear in all - * copies and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the name of M.I.T. not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Furthermore if you - * modify this software you must label your software as modified software - * and not distribute it in such a fashion that it might be confused with - * the original MIT software. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Individual source code files are copyright MIT, Cygnus Support, - * OpenVision, Oracle, Sun Soft, FundsXpress, and others. - * - * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira, - * and Zephyr are trademarks of the Massachusetts Institute of Technology - * (MIT). No commercial use of these trademarks may be made without prior - * written permission of MIT. - * - * "Commercial use" means use of a name in a product or other for-profit - * manner. It does NOT prevent a commercial firm from referring to the MIT - * trademarks in order to convey information (although in doing so, - * recognition of their trademark status should be given). - * $ - */ - -/* - * Message type specific header structures. - * - */ - -#ifndef __MSG_HEADERS_H__ -#define __MSG_HEADERS_H__ - -#include "CredentialsCache.h" - -/* - * All header structs must have sizes divisible by 4, and - * all individual fields within the structs must also have - * size divisible by 4. This is to ensure correct alignment - * and stop different compilers from inserting padding bytes in - * different places. - * - * All values are stored in network byte order. - */ - -struct ccmsg_ctx_only_t { - cc_handle ctx; -}; -typedef struct ccmsg_ctx_only_t ccmsg_ctx_only_t; - -struct ccmsg_nack_t { - cc_uint32 err_code; /*error code that caused failure*/ -}; -typedef struct ccmsg_nack_t ccmsg_nack_t; - -struct ccmsg_init_t { - cc_uint32 in_version; /*client API version*/ -}; -struct ccmsg_init_resp_t { - cc_handle out_ctx; /*handle on this ctx*/ - cc_uint32 out_version; /*server API version*/ - cc_uint32 vendor_offset; /*offset of vendor blob*/ - cc_uint32 vendor_length; /*length of vendor blob*/ -}; -typedef struct ccmsg_init_t ccmsg_init_t; -typedef struct ccmsg_init_resp_t ccmsg_init_resp_t; - -struct ccmsg_ctx_clone_t { - cc_handle ctx; - cc_uint32 in_version; /*client API version*/ -}; -struct ccmsg_ctx_clone_resp_t { - cc_handle out_ctx; /*handle on this ctx*/ - cc_uint32 out_version; /*server API version*/ - cc_uint32 vendor_offset; /*offset of vendor blob*/ - cc_uint32 vendor_length; /*length of vendor blob*/ -}; -typedef struct ccmsg_ctx_clone_t ccmsg_ctx_clone_t; -typedef struct ccmsg_ctx_clone_resp_t ccmsg_ctx_clone_resp_t; - -struct ccmsg_ctx_release_t { - cc_handle ctx; /*# of ctx to release*/ -}; -typedef struct ccmsg_ctx_release_t ccmsg_ctx_release_t; - -struct ccmsg_ctx_get_change_time_t { - cc_handle ctx; -}; -struct ccmsg_ctx_get_change_time_resp_t { - cc_time64 time; -}; -typedef struct ccmsg_ctx_get_change_time_t ccmsg_ctx_get_change_time_t; -typedef struct ccmsg_ctx_get_change_time_resp_t ccmsg_ctx_get_change_time_resp_t; - -struct ccmsg_ctx_get_default_ccache_name_t { - cc_handle ctx; -}; -struct ccmsg_ctx_get_default_ccache_name_resp_t { - cc_uint32 name_offset; - cc_uint32 name_len; -}; -typedef struct ccmsg_ctx_get_default_ccache_name_t ccmsg_ctx_get_default_ccache_name_t; -typedef struct ccmsg_ctx_get_default_ccache_name_resp_t ccmsg_ctx_get_default_ccache_name_resp_t; - -struct ccmsg_ctx_compare_t { - cc_handle ctx1; - cc_handle ctx2; -}; -struct ccmsg_ctx_compare_resp_t { - cc_uint32 is_equal; -}; -typedef struct ccmsg_ctx_compare_t ccmsg_ctx_compare_t; -typedef struct ccmsg_ctx_compare_resp_t ccmsg_ctx_compare_resp_t; - -struct ccmsg_ctx_new_ccache_iterator_t { - cc_handle ctx; -}; -struct ccmsg_ctx_new_ccache_iterator_resp_t { - cc_handle iterator; -}; -typedef struct ccmsg_ctx_new_ccache_iterator_t ccmsg_ctx_new_ccache_iterator_t; -typedef struct ccmsg_ctx_new_ccache_iterator_resp_t ccmsg_ctx_new_ccache_iterator_resp_t; - -struct ccmsg_ctx_lock_t { - cc_handle ctx; - cc_uint32 lock_type; -}; -typedef struct ccmsg_ctx_lock_t ccmsg_ctx_lock_t; - -struct ccmsg_ctx_unlock_t { - cc_handle ctx; -}; -typedef struct ccmsg_ctx_unlock_t ccmsg_ctx_unlock_t; - -struct ccmsg_ccache_open_t { - cc_handle ctx; - cc_uint32 name_offset; - cc_uint32 name_len; -}; -struct ccmsg_ccache_open_resp_t { - cc_handle ccache; -}; -typedef struct ccmsg_ccache_open_t ccmsg_ccache_open_t; -typedef struct ccmsg_ccache_open_resp_t ccmsg_ccache_open_resp_t; - -struct ccmsg_ccache_open_default_t { - cc_handle ctx; -}; -typedef struct ccmsg_ccache_open_default_t ccmsg_ccache_open_default_t; - -struct ccmsg_ccache_create_t { - cc_handle ctx; - cc_uint32 version; - cc_uint32 principal_offset; - cc_uint32 principal_len; - cc_uint32 name_offset; - cc_uint32 name_len; -}; -struct ccmsg_ccache_create_default_t { - cc_handle ctx; - cc_uint32 version; - cc_uint32 principal_offset; - cc_uint32 principal_len; -}; -struct ccmsg_ccache_create_unique_t { - cc_handle ctx; - cc_uint32 version; - cc_uint32 principal_offset; - cc_uint32 principal_len; -}; - -struct ccmsg_ccache_create_resp_t { - cc_handle ccache; -}; -typedef struct ccmsg_ccache_create_t ccmsg_ccache_create_t; -typedef struct ccmsg_ccache_create_default_t ccmsg_ccache_create_default_t; -typedef struct ccmsg_ccache_create_unique_t ccmsg_ccache_create_unique_t; -typedef struct ccmsg_ccache_create_resp_t ccmsg_ccache_create_resp_t; - -struct ccmsg_ccache_release_t { - cc_handle ctx; - cc_handle ccache; -}; -typedef struct ccmsg_ccache_release_t ccmsg_ccache_release_t; - -struct ccmsg_ccache_destroy_t { - cc_handle ctx; - cc_handle ccache; -}; -typedef struct ccmsg_ccache_destroy_t ccmsg_ccache_destroy_t; - -struct ccmsg_ccache_set_default_t { - cc_handle ctx; - cc_handle ccache; -}; -typedef struct ccmsg_ccache_set_default_t ccmsg_ccache_set_default_t; - -struct ccmsg_ccache_get_creds_version_t { - cc_handle ctx; - cc_handle ccache; -}; -struct ccmsg_ccache_get_creds_version_resp_t { - cc_uint32 version; -}; -typedef struct ccmsg_ccache_get_creds_version_t ccmsg_ccache_get_creds_version_t; -typedef struct ccmsg_ccache_get_creds_version_resp_t ccmsg_ccache_get_creds_version_resp_t; - -struct ccmsg_ccache_get_name_t { - cc_handle ctx; - cc_handle ccache; -}; -struct ccmsg_ccache_get_name_resp_t { - cc_uint32 name_offset; - cc_uint32 name_len; -}; -typedef struct ccmsg_ccache_get_name_t ccmsg_ccache_get_name_t; -typedef struct ccmsg_ccache_get_name_resp_t ccmsg_ccache_get_name_resp_t; - -struct ccmsg_ccache_get_principal_t { - cc_handle ctx; - cc_handle ccache; - cc_uint32 version; -}; -struct ccmsg_ccache_get_principal_resp_t { - cc_uint32 principal_offset; - cc_uint32 principal_len; -}; -typedef struct ccmsg_ccache_get_principal_t ccmsg_ccache_get_principal_t; -typedef struct ccmsg_ccache_get_principal_resp_t ccmsg_ccache_get_principal_resp_t; - -struct ccmsg_ccache_set_principal_t { - cc_handle ctx; - cc_handle ccache; - cc_uint32 version; - cc_uint32 principal_offset; - cc_uint32 principal_len; -}; -typedef struct ccmsg_ccache_set_principal_t ccmsg_ccache_set_principal_t; - -struct ccmsg_ccache_creds_iterator_t { - cc_handle ctx; - cc_handle ccache; -}; -struct ccmsg_ccache_creds_iterator_resp_t { - cc_handle iterator; -}; -typedef struct ccmsg_ccache_creds_iterator_t ccmsg_ccache_creds_iterator_t; -typedef struct ccmsg_ccache_creds_iterator_resp_t ccmsg_ccache_creds_iterator_resp_t; - -struct ccmsg_ccache_store_creds_t { - cc_handle ctx; - cc_handle ccache; - cc_uint32 creds_version; - cc_uint32 creds_offset; - cc_uint32 creds_len; -}; -typedef struct ccmsg_ccache_store_creds_t ccmsg_ccache_store_creds_t; - -struct ccmsg_ccache_rem_creds_t { - cc_handle ctx; - cc_handle ccache; - cc_handle creds; -}; -typedef struct ccmsg_ccache_rem_creds_t ccmsg_ccache_rem_creds_t; - -struct ccmsg_ccache_lock_t { - cc_handle ctx; - cc_handle ccache; - cc_uint32 lock_type; -}; -typedef struct ccmsg_ccache_lock_t ccmsg_ccache_lock_t; - -struct ccmsg_ccache_unlock_t { - cc_handle ctx; - cc_handle ccache; -}; -typedef struct ccmsg_ccache_unlock_t ccmsg_ccache_unlock_t; - -struct ccmsg_ccache_move_t { - cc_handle ctx; - cc_handle ccache_source; - cc_handle ccache_dest; -}; -typedef struct ccmsg_ccache_move_t ccmsg_ccache_move_t; - -struct ccmsg_ccache_get_last_default_time_t { - cc_handle ctx; - cc_handle ccache; -}; -struct ccmsg_ccache_get_last_default_time_resp_t { - cc_time64 last_default_time; -}; -typedef struct ccmsg_ccache_get_last_default_time_t ccmsg_ccache_get_last_default_time_t; -typedef struct ccmsg_ccache_get_last_default_time_resp_t ccmsg_ccache_get_last_default_time_resp_t; - -struct ccmsg_ccache_get_change_time_t { - cc_handle ctx; - cc_handle ccache; -}; -struct ccmsg_ccache_get_change_time_resp_t { - cc_time64 time; -}; -typedef struct ccmsg_ccache_get_change_time_t ccmsg_ccache_get_change_time_t; -typedef struct ccmsg_ccache_get_change_time_resp_t ccmsg_ccache_get_change_time_resp_t; - -struct ccmsg_ccache_compare_t { - cc_handle ctx; - cc_handle ccache1; - cc_handle ccache2; -}; -struct ccmsg_ccache_compare_resp_t { - cc_uint32 is_equal; -}; -typedef struct ccmsg_ccache_compare_t ccmsg_ccache_compare_t; -typedef struct ccmsg_ccache_compare_resp_t ccmsg_ccache_compare_resp_t; - -struct ccmsg_ccache_get_kdc_time_offset_t { - cc_handle ctx; - cc_handle ccache; - cc_int32 creds_version; -}; -struct ccmsg_ccache_get_kdc_time_offset_resp_t { - cc_time64 offset; -}; -typedef struct ccmsg_ccache_get_kdc_time_offset_t ccmsg_ccache_get_kdc_time_offset_t; -typedef struct ccmsg_ccache_get_kdc_time_offset_resp_t ccmsg_ccache_get_kdc_time_offset_resp_t; - -struct ccmsg_ccache_set_kdc_time_offset_t { - cc_handle ctx; - cc_handle ccache; - cc_time64 offset; - cc_int32 creds_version; -}; -typedef struct ccmsg_ccache_set_kdc_time_offset_t ccmsg_ccache_set_kdc_time_offset_t; - -struct ccmsg_ccache_clear_kdc_time_offset_t { - cc_handle ctx; - cc_handle ccache; - cc_int32 creds_version; -}; -typedef struct ccmsg_ccache_clear_kdc_time_offset_t ccmsg_ccache_clear_kdc_time_offset_t; - -struct ccmsg_ccache_iterator_release_t { - cc_handle ctx; - cc_handle iterator; -}; -typedef struct ccmsg_ccache_iterator_release_t ccmsg_ccache_iterator_release_t; - -struct ccmsg_ccache_iterator_next_t { - cc_handle ctx; - cc_handle iterator; -}; -struct ccmsg_ccache_iterator_next_resp_t { - cc_handle ccache; -}; -typedef struct ccmsg_ccache_iterator_next_t ccmsg_ccache_iterator_next_t; -typedef struct ccmsg_ccache_iterator_next_resp_t ccmsg_ccache_iterator_next_resp_t; - -struct ccmsg_ccache_iterator_clone_t { - cc_handle ctx; - cc_handle iterator; -}; -struct ccmsg_ccache_iterator_clone_resp_t { - cc_handle iterator; -}; -typedef struct ccmsg_ccache_iterator_clone_t ccmsg_ccache_iterator_clone_t; -typedef struct ccmsg_ccache_iterator_clone_resp_t ccmsg_ccache_iterator_clone_resp_t; - -struct ccmsg_creds_iterator_release_t { - cc_handle ctx; - cc_handle ccache; - cc_handle iterator; -}; -typedef struct ccmsg_creds_iterator_release_t ccmsg_creds_iterator_release_t; - -struct ccmsg_creds_iterator_next_t { - cc_handle ctx; - cc_handle ccache; - cc_handle iterator; -}; -struct ccmsg_creds_iterator_next_resp_t { - cc_uint32 version; - cc_handle creds_handle; - cc_uint32 creds_offset; - cc_uint32 creds_len; -}; -typedef struct ccmsg_creds_iterator_next_t ccmsg_creds_iterator_next_t; -typedef struct ccmsg_creds_iterator_next_resp_t ccmsg_creds_iterator_next_resp_t; - -struct ccmsg_creds_iterator_clone_t { - cc_handle ctx; - cc_handle iterator; -}; -struct ccmsg_creds_iterator_clone_resp_t { - cc_handle iterator; -}; -typedef struct ccmsg_creds_iterator_clone_t ccmsg_creds_iterator_clone_t; -typedef struct ccmsg_creds_iterator_clone_resp_t ccmsg_creds_iterator_clone_resp_t; - -#endif /*__MSG_HEADERS_H__*/ diff --git a/src/lib/ccapi/include/rpc_auth.h b/src/lib/ccapi/include/rpc_auth.h deleted file mode 100644 index 010a1e2a51..0000000000 --- a/src/lib/ccapi/include/rpc_auth.h +++ /dev/null @@ -1,71 +0,0 @@ -/* $Copyright: - * - * Copyright 2004-2006 by the Massachusetts Institute of Technology. - * - * All rights reserved. - * - * Export of this software from the United States of America may require a - * specific license from the United States Government. It is the - * responsibility of any person or organization contemplating export to - * obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute - * this software and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice appear in all - * copies and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the name of M.I.T. not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Furthermore if you - * modify this software you must label your software as modified software - * and not distribute it in such a fashion that it might be confused with - * the original MIT software. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Individual source code files are copyright MIT, Cygnus Support, - * OpenVision, Oracle, Sun Soft, FundsXpress, and others. - * - * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira, - * and Zephyr are trademarks of the Massachusetts Institute of Technology - * (MIT). No commercial use of these trademarks may be made without prior - * written permission of MIT. - * - * "Commercial use" means use of a name in a product or other for-profit - * manner. It does NOT prevent a commercial firm from referring to the MIT - * trademarks in order to convey information (although in doing so, - * recognition of their trademark status should be given). - * $ - */ - - -/* - * Types for RPC auth + session info - * - */ - -#ifndef __RPC_AUTH_H__ -#define __RPC_AUTH_H__ - -#include "CredentialsCache.h" - -/*preliminary*/ -struct cc_auth_info_t { - cc_uint8 *info; - cc_uint32 len; -}; -typedef struct cc_auth_info_t cc_auth_info_t; - -/*preliminary*/ -struct cc_session_info_t { - cc_uint8 *info; - cc_uint32 len; -}; -typedef struct cc_session_info_t cc_session_info_t; - -cc_int32 ccs_rpc_is_authorized(cc_auth_info_t* msg_auth, cc_session_info_t* msg_session, cc_auth_info_t* stored_auth, cc_session_info_t* stored_session, cc_uint32 *authorizedp); - -#endif /*__RPC_AUTH_H__*/ |
