diff options
author | Danilo Almeida <dalmeida@mit.edu> | 2000-04-18 21:25:52 +0000 |
---|---|---|
committer | Danilo Almeida <dalmeida@mit.edu> | 2000-04-18 21:25:52 +0000 |
commit | d0882bd6225ebd61f5fad4c523f31da18db0d048 (patch) | |
tree | 88a52150312876559bab1f9a907d783d503cfe9f /src | |
parent | 95ade1488bae6d4bd0d676f487d29b4a9e2f1081 (diff) | |
download | krb5-d0882bd6225ebd61f5fad4c523f31da18db0d048.tar.gz krb5-d0882bd6225ebd61f5fad4c523f31da18db0d048.tar.xz krb5-d0882bd6225ebd61f5fad4c523f31da18db0d048.zip |
* winccld.h: Define CC_API_VER2 for all Windows code using ccapi.
Update dynamic loading declarations to use CC_API_VER2.
* stdcc.c: Define CC_API_VER2 if not defined rather than just if
not Windows.
* winccld.c (LoadFuncs): Get error on DLL load failure even though
we do not use it in case we are doing source-level debugging.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12178 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/krb5/ccache/ccapi/ChangeLog | 11 | ||||
-rw-r--r-- | src/lib/krb5/ccache/ccapi/stdcc.c | 2 | ||||
-rw-r--r-- | src/lib/krb5/ccache/ccapi/winccld.c | 2 | ||||
-rw-r--r-- | src/lib/krb5/ccache/ccapi/winccld.h | 48 |
4 files changed, 62 insertions, 1 deletions
diff --git a/src/lib/krb5/ccache/ccapi/ChangeLog b/src/lib/krb5/ccache/ccapi/ChangeLog index a47bfd378e..5fd1a42227 100644 --- a/src/lib/krb5/ccache/ccapi/ChangeLog +++ b/src/lib/krb5/ccache/ccapi/ChangeLog @@ -1,3 +1,14 @@ +2000-04-18 Danilo Almeida <dalmeida@mit.edu> + + * winccld.h: Define CC_API_VER2 for all Windows code using ccapi. + Update dynamic loading declarations to use CC_API_VER2. + + * stdcc.c: Define CC_API_VER2 if not defined rather than just if + not Windows. + + * winccld.c (LoadFuncs): Get error on DLL load failure even though + we do not use it in case we are doing source-level debugging. + 2000-04-07 Jeffrey Altman <jaltman@columbia.edu> * stdcc_util.c (copyCCDataArrayToK5, copyCCDataArrayToK5): diff --git a/src/lib/krb5/ccache/ccapi/stdcc.c b/src/lib/krb5/ccache/ccapi/stdcc.c index a17cd02650..849a906c89 100644 --- a/src/lib/krb5/ccache/ccapi/stdcc.c +++ b/src/lib/krb5/ccache/ccapi/stdcc.c @@ -40,7 +40,7 @@ apiCB *gCntrlBlock = NULL; #include "winccld.h" #endif -#if !defined(_MSDOS) && !defined(_WIN32) +#ifndef CC_API_VER2 #define CC_API_VER2 #endif diff --git a/src/lib/krb5/ccache/ccapi/winccld.c b/src/lib/krb5/ccache/ccapi/winccld.c index 2792ceeda4..4fded76d87 100644 --- a/src/lib/krb5/ccache/ccapi/winccld.c +++ b/src/lib/krb5/ccache/ccapi/winccld.c @@ -45,6 +45,8 @@ static int LoadFuncs(const char* dll_name, FUNC_INFO fi[], } if (!(h = LoadLibrary(dll_name))) { + /* Get error for source debugging purposes. */ + error = (int)GetLastError(); return LF_NODLL; } diff --git a/src/lib/krb5/ccache/ccapi/winccld.h b/src/lib/krb5/ccache/ccapi/winccld.h index 09a7ef5cde..c2ae4dcf4e 100644 --- a/src/lib/krb5/ccache/ccapi/winccld.h +++ b/src/lib/krb5/ccache/ccapi/winccld.h @@ -6,6 +6,10 @@ #ifndef KRB5_WINCCLD_H_ #define KRB5_WINCCLD_H_ +#ifndef CC_API_VER2 +#define CC_API_VER2 +#endif + #include "cacheapi.h" typedef cc_int32 (*FP_cc_initialize)(apiCB**, const cc_int32, @@ -19,6 +23,9 @@ typedef cc_int32 (*FP_cc_open)(apiCB*, const char*, const enum cc_cred_vers, typedef cc_int32 (*FP_cc_close)(apiCB*, ccache_p**); typedef cc_int32 (*FP_cc_destroy)(apiCB*, ccache_p**); typedef cc_int32 (*FP_cc_seq_fetch_NCs)(apiCB*, ccache_p**, ccache_cit**); +typedef cc_int32 (*FP_cc_seq_fetch_NCs_begin)(apiCB*, ccache_cit**); +typedef cc_int32 (*FP_cc_seq_fetch_NCs_next)(apiCB*, ccache_p**, ccache_cit*); +typedef cc_int32 (*FP_cc_seq_fetch_NCs_end)(apiCB*, ccache_cit**); typedef cc_int32 (*FP_cc_get_NC_info)(apiCB*, struct _infoNC***); typedef cc_int32 (*FP_cc_free_NC_info)(apiCB*, struct _infoNC***); typedef cc_int32 (*FP_cc_get_name)(apiCB*, const ccache_p*, char**); @@ -34,6 +41,11 @@ typedef cc_int32 (*FP_cc_remove_cred)(apiCB*, const ccache_p*, const cred_union); typedef cc_int32 (*FP_cc_seq_fetch_creds)(apiCB*, const ccache_p*, cred_union**, ccache_cit**); +typedef cc_int32 (*FP_cc_seq_fetch_creds_begin)(apiCB*, const ccache_p*, + ccache_cit**); +typedef cc_int32 (*FP_cc_seq_fetch_creds_next)(apiCB*, cred_union**, + ccache_cit*); +typedef cc_int32 (*FP_cc_seq_fetch_creds_end)(apiCB*, ccache_cit**); typedef cc_int32 (*FP_cc_free_principal)(apiCB*, char**); typedef cc_int32 (*FP_cc_free_name)(apiCB*, char** name); typedef cc_int32 (*FP_cc_free_creds)(apiCB*, cred_union** pCred); @@ -58,9 +70,17 @@ DECL_FUNC_PTR(cc_create); DECL_FUNC_PTR(cc_open); DECL_FUNC_PTR(cc_close); DECL_FUNC_PTR(cc_destroy); +#if 0 /* Not used */ +#ifdef CC_API_VER2 +DECL_FUNC_PTR(cc_seq_fetch_NCs_begin); +DECL_FUNC_PTR(cc_seq_fetch_NCs_next); +DECL_FUNC_PTR(cc_seq_fetch_NCs_end); +#else DECL_FUNC_PTR(cc_seq_fetch_NCs); +#endif DECL_FUNC_PTR(cc_get_NC_info); DECL_FUNC_PTR(cc_free_NC_info); +#endif DECL_FUNC_PTR(cc_get_name); DECL_FUNC_PTR(cc_set_principal); DECL_FUNC_PTR(cc_get_principal); @@ -68,7 +88,13 @@ DECL_FUNC_PTR(cc_get_cred_version); DECL_FUNC_PTR(cc_lock_request); DECL_FUNC_PTR(cc_store); DECL_FUNC_PTR(cc_remove_cred); +#ifdef CC_API_VER2 +DECL_FUNC_PTR(cc_seq_fetch_creds_begin); +DECL_FUNC_PTR(cc_seq_fetch_creds_next); +DECL_FUNC_PTR(cc_seq_fetch_creds_end); +#else DECL_FUNC_PTR(cc_seq_fetch_creds); +#endif DECL_FUNC_PTR(cc_free_principal); DECL_FUNC_PTR(cc_free_name); DECL_FUNC_PTR(cc_free_creds); @@ -82,9 +108,11 @@ FUNC_INFO krbcc_fi[] = { MAKE_FUNC_INFO(cc_open), MAKE_FUNC_INFO(cc_close), MAKE_FUNC_INFO(cc_destroy), +#if 0 /* Not used */ MAKE_FUNC_INFO(cc_seq_fetch_NCs), MAKE_FUNC_INFO(cc_get_NC_info), MAKE_FUNC_INFO(cc_free_NC_info), +#endif MAKE_FUNC_INFO(cc_get_name), MAKE_FUNC_INFO(cc_set_principal), MAKE_FUNC_INFO(cc_get_principal), @@ -92,7 +120,13 @@ FUNC_INFO krbcc_fi[] = { MAKE_FUNC_INFO(cc_lock_request), MAKE_FUNC_INFO(cc_store), MAKE_FUNC_INFO(cc_remove_cred), +#ifdef CC_API_VER2 + MAKE_FUNC_INFO(cc_seq_fetch_creds_begin), + MAKE_FUNC_INFO(cc_seq_fetch_creds_next), + MAKE_FUNC_INFO(cc_seq_fetch_creds_end), +#else MAKE_FUNC_INFO(cc_seq_fetch_creds), +#endif MAKE_FUNC_INFO(cc_free_principal), MAKE_FUNC_INFO(cc_free_name), MAKE_FUNC_INFO(cc_free_creds), @@ -109,9 +143,17 @@ FUNC_INFO krbcc_fi[] = { #define cc_open pcc_open #define cc_close pcc_close #define cc_destroy pcc_destroy +#if 0 /* Not used */ +#ifdef CC_API_VER2 +#define cc_seq_fetch_NCs_begin pcc_seq_fetch_NCs_begin +#define cc_seq_fetch_NCs_next pcc_seq_fetch_NCs_next +#define cc_seq_fetch_NCs_end pcc_seq_fetch_NCs_end +#else #define cc_seq_fetch_NCs pcc_seq_fetch_NCs +#endif #define cc_get_NC_info pcc_get_NC_info #define cc_free_NC_info pcc_free_NC_info +#endif /* End of Not used */ #define cc_get_name pcc_get_name #define cc_set_principal pcc_set_principal #define cc_get_principal pcc_get_principal @@ -119,7 +161,13 @@ FUNC_INFO krbcc_fi[] = { #define cc_lock_request pcc_lock_request #define cc_store pcc_store #define cc_remove_cred pcc_remove_cred +#ifdef CC_API_VER2 +#define cc_seq_fetch_creds_begin pcc_seq_fetch_creds_begin +#define cc_seq_fetch_creds_next pcc_seq_fetch_creds_next +#define cc_seq_fetch_creds_end pcc_seq_fetch_creds_end +#else #define cc_seq_fetch_creds pcc_seq_fetch_creds +#endif #define cc_free_principal pcc_free_principal #define cc_free_name pcc_free_name #define cc_free_creds pcc_free_creds |