pull up r24529, r24532 from trunk
authorTom Yu <tlyu@mit.edu>
Wed, 1 Dec 2010 02:16:37 +0000 (02:16 +0000)
committerTom Yu <tlyu@mit.edu>
Wed, 1 Dec 2010 02:16:37 +0000 (02:16 +0000)
 ------------------------------------------------------------------------
 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

src/include/k5-int.h
src/include/krb5/krb5.hin
src/lib/krb5/krb/gic_pwd.c

index ca1458620db3594dca3379bfed3eccbfc952793b..229d2d2912e8e1db3e0672b25b237144feb1fe12 100644 (file)
@@ -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;
 
index e04cf3b1123688a23f4bf18ad2280fbdfb855aed..51d7d728da49cf8dd32ac897542321d072f31b8c 100644 (file)
@@ -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.
index 1e0b741e38ac141395996a1832b492ad89284db7..1fdc814d2262db0ce72c3ec5e1a964ddf4ad4483 100644 (file)
@@ -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. */