From: Tom Yu Date: Wed, 1 Dec 2010 02:16:37 +0000 (+0000) Subject: pull up r24529, r24532 from trunk X-Git-Tag: krb5-1.9-beta2~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=72aea6d91dfd1d522d109ebb41dac3e0621bdb5d;p=krb5.git pull up r24529, r24532 from trunk ------------------------------------------------------------------------ r24532 | tlyu | 2010-11-23 18:51:50 -0500 (Tue, 23 Nov 2010) | 6 lines ticket: 6825 Update krb5_gic_opt_private and related code to reflect the change of krb5_expire_callback_func from a function typedef to a function pointer typedef. This was causing segfaults. ------------------------------------------------------------------------ r24529 | ghudson | 2010-11-22 23:50:40 -0500 (Mon, 22 Nov 2010) | 9 lines ticket: 6825 subject: Add missing KRB5_CALLCONV in callback declaration target_version: 1.9 tags: pullup krb5_get_init_creds_opt_set_expire_callback was correctly tagged with KRB5_CALLCONV but the corresponding callback type was not. Add that in. ticket: 6825 version_fixed: 1.9 status: resolved git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-9@24546 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/k5-int.h b/src/include/k5-int.h index ca1458620..229d2d291 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -1150,7 +1150,7 @@ typedef struct _krb5_gic_opt_private { char * fast_ccache_name; krb5_ccache out_ccache; krb5_flags fast_flags; - krb5_expire_callback_func *expire_cb; + krb5_expire_callback_func expire_cb; void *expire_data; } krb5_gic_opt_private; diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin index e04cf3b11..51d7d728d 100644 --- a/src/include/krb5/krb5.hin +++ b/src/include/krb5/krb5.hin @@ -2381,10 +2381,10 @@ krb5_get_init_creds_opt_get_fast_flags(krb5_context context, #define KRB5_FAST_REQUIRED 1l<<0 /*!< Require KDC to support FAST*/ typedef void -krb5_expire_callback_func(krb5_context context, void *data, - krb5_timestamp password_expiration, - krb5_timestamp account_expiration, - krb5_boolean is_last_req); +(KRB5_CALLCONV *krb5_expire_callback_func)(krb5_context context, void *data, + krb5_timestamp password_expiration, + krb5_timestamp account_expiration, + krb5_boolean is_last_req); /** * Set a callback to receive password and account expiration times. diff --git a/src/lib/krb5/krb/gic_pwd.c b/src/lib/krb5/krb/gic_pwd.c index 1e0b741e3..1fdc814d2 100644 --- a/src/lib/krb5/krb/gic_pwd.c +++ b/src/lib/krb5/krb/gic_pwd.c @@ -159,7 +159,7 @@ warn_pw_expiry(krb5_context context, krb5_get_init_creds_opt *options, ret = krb5int_gic_opt_to_opte(context, options, &opte, 0, ""); if (ret == 0 && opte->opt_private->expire_cb != NULL) { - krb5_expire_callback_func *cb = opte->opt_private->expire_cb; + krb5_expire_callback_func cb = opte->opt_private->expire_cb; void *cb_data = opte->opt_private->expire_data; /* Invoke the expire callback and don't send prompter warnings. */