svn rev #24546: branches/krb5-1-9/src/ include/ include/krb5/ lib/krb5/krb/

tlyu@MIT.EDU tlyu at MIT.EDU
Tue Nov 30 21:16:37 EST 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=24546
Commit By: tlyu
Log Message:
ticket: 6825
version_fixed: 1.9
status: resolved

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.


Changed Files:
U   branches/krb5-1-9/src/include/k5-int.h
U   branches/krb5-1-9/src/include/krb5/krb5.hin
U   branches/krb5-1-9/src/lib/krb5/krb/gic_pwd.c
Modified: branches/krb5-1-9/src/include/k5-int.h
===================================================================
--- branches/krb5-1-9/src/include/k5-int.h	2010-12-01 02:16:31 UTC (rev 24545)
+++ branches/krb5-1-9/src/include/k5-int.h	2010-12-01 02:16:37 UTC (rev 24546)
@@ -1150,7 +1150,7 @@
     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;
 

Modified: branches/krb5-1-9/src/include/krb5/krb5.hin
===================================================================
--- branches/krb5-1-9/src/include/krb5/krb5.hin	2010-12-01 02:16:31 UTC (rev 24545)
+++ branches/krb5-1-9/src/include/krb5/krb5.hin	2010-12-01 02:16:37 UTC (rev 24546)
@@ -2381,10 +2381,10 @@
 #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.

Modified: branches/krb5-1-9/src/lib/krb5/krb/gic_pwd.c
===================================================================
--- branches/krb5-1-9/src/lib/krb5/krb/gic_pwd.c	2010-12-01 02:16:31 UTC (rev 24545)
+++ branches/krb5-1-9/src/lib/krb5/krb/gic_pwd.c	2010-12-01 02:16:37 UTC (rev 24546)
@@ -159,7 +159,7 @@
 
     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. */




More information about the cvs-krb5 mailing list