From 87290fd3c28309778b5de78812a283bcfaeae56f Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Sat, 17 Apr 1999 05:25:04 +0000 Subject: [PATCH] gssapi_krb5.h, copy_ccache.c, get_tkt_flags.c, set_ccache.c: Make the krb5 extension functions exportable in a Windows DLL. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11367 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/ChangeLog | 6 ++++++ src/lib/gssapi/krb5/copy_ccache.c | 2 +- src/lib/gssapi/krb5/get_tkt_flags.c | 2 +- src/lib/gssapi/krb5/gssapi_krb5.h | 13 +++---------- src/lib/gssapi/krb5/set_ccache.c | 15 +++++++-------- 5 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index 1ad383abf..61b9cb586 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,9 @@ +Sat Apr 17 01:23:57 1999 Theodore Y. Ts'o + + * gssapi_krb5.h, copy_ccache.c, get_tkt_flags.c, set_ccache.c: + Make the krb5 extension functions exportable in a Windows + DLL. + Fri Mar 26 22:17:20 1999 Theodore Y. Ts'o * acquire_cred.c (krb5_gss_acquire_cred): Don't use strcmp to diff --git a/src/lib/gssapi/krb5/copy_ccache.c b/src/lib/gssapi/krb5/copy_ccache.c index 8096eecc3..96027b494 100644 --- a/src/lib/gssapi/krb5/copy_ccache.c +++ b/src/lib/gssapi/krb5/copy_ccache.c @@ -1,6 +1,6 @@ #include "gssapiP_krb5.h" -OM_uint32 +GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_krb5_copy_ccache(minor_status, cred_handle, out_ccache) OM_uint32 *minor_status; gss_cred_id_t cred_handle; diff --git a/src/lib/gssapi/krb5/get_tkt_flags.c b/src/lib/gssapi/krb5/get_tkt_flags.c index eebf06d81..7dd5d5cc4 100644 --- a/src/lib/gssapi/krb5/get_tkt_flags.c +++ b/src/lib/gssapi/krb5/get_tkt_flags.c @@ -26,7 +26,7 @@ * $Id$ */ -OM_uint32 +GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_krb5_get_tkt_flags(minor_status, context_handle, ticket_flags) OM_uint32 *minor_status; gss_ctx_id_t context_handle; diff --git a/src/lib/gssapi/krb5/gssapi_krb5.h b/src/lib/gssapi/krb5/gssapi_krb5.h index 5a768b6d5..13ccf6870 100644 --- a/src/lib/gssapi/krb5/gssapi_krb5.h +++ b/src/lib/gssapi/krb5/gssapi_krb5.h @@ -56,27 +56,20 @@ extern const gss_OID_desc krb5_gss_oid_array[]; #define gss_krb5_nt_machine_uid_name gss_nt_machine_uid_name #define gss_krb5_nt_string_uid_name gss_nt_string_uid_name -OM_uint32 gss_krb5_get_tkt_flags +GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_krb5_get_tkt_flags PROTOTYPE((OM_uint32 *minor_status, gss_ctx_id_t context_handle, krb5_flags *ticket_flags)); -OM_uint32 gss_krb5_copy_ccache +GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_krb5_copy_ccache PROTOTYPE((OM_uint32 *minor_status, gss_cred_id_t cred_handle, krb5_ccache out_ccache)); -OM_uint32 gss_krb5_ccache_name +GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_krb5_ccache_name PROTOTYPE((OM_uint32 *minor_status, const char *name, const char **out_name)); -/* this is for backward compatibility only. It is declared here for - completeness, but should not be used */ - -OM_uint32 krb5_gss_set_backward_mode - PROTOTYPE((OM_uint32 *minor_status, - int mode)); - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/src/lib/gssapi/krb5/set_ccache.c b/src/lib/gssapi/krb5/set_ccache.c index 85a1bc505..3732ca78e 100644 --- a/src/lib/gssapi/krb5/set_ccache.c +++ b/src/lib/gssapi/krb5/set_ccache.c @@ -1,25 +1,24 @@ #include "gssapiP_krb5.h" -OM_uint32 +GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_krb5_ccache_name(minor_status, name, out_name) OM_uint32 *minor_status; const char *name; const char **out_name; { krb5_context context; - krb5_error_code retval; + krb5_error_code retval; if (GSS_ERROR(kg_get_context(minor_status, &context))) return (GSS_S_FAILURE); if (out_name) *out_name = krb5_cc_default_name(context); - if (name) { - retval = krb5_cc_set_default_name(context, name); - if (retval) { - *minor_status = retval; - return GSS_S_FAILURE; - } + + retval = krb5_cc_set_default_name(context, name); + if (retval) { + *minor_status = retval; + return GSS_S_FAILURE; } return GSS_S_COMPLETE; } -- 2.26.2