svn rev #25630: branches/krb5-1-10/src/plugins/preauth/securid_sam2/

tlyu@MIT.EDU tlyu at MIT.EDU
Mon Jan 9 16:23:49 EST 2012


http://src.mit.edu/fisheye/changelog/krb5/?cs=25630
Commit By: tlyu
Log Message:
ticket: 7060
version_fixed: 1.10
status: resolved

Pull up r25621 from trunk

 ------------------------------------------------------------------------
 r25621 | ghudson | 2012-01-07 15:57:36 -0500 (Sat, 07 Jan 2012) | 9 lines

 ticket: 7060
 subject: Convert securid module edata method
 target_version: 1.10
 tags: pullup

 r25348 made modified the edata method of the kdcpreauth interface to
 be async-capable, but neglected to convert the securid_sam2 module's
 edata function.  Do that now.


Changed Files:
U   branches/krb5-1-10/src/plugins/preauth/securid_sam2/securid_sam2_main.c
Modified: branches/krb5-1-10/src/plugins/preauth/securid_sam2/securid_sam2_main.c
===================================================================
--- branches/krb5-1-10/src/plugins/preauth/securid_sam2/securid_sam2_main.c	2012-01-09 21:23:46 UTC (rev 25629)
+++ branches/krb5-1-10/src/plugins/preauth/securid_sam2/securid_sam2_main.c	2012-01-09 21:23:48 UTC (rev 25630)
@@ -112,10 +112,11 @@
     }
 }
 
-static krb5_error_code
+static void
 kdc_include_padata(krb5_context context, krb5_kdc_req *request,
                    krb5_kdcpreauth_callbacks cb, krb5_kdcpreauth_rock rock,
-                   krb5_kdcpreauth_moddata moddata, krb5_pa_data *pa_data)
+                   krb5_kdcpreauth_moddata moddata, krb5_preauthtype pa_type,
+                   krb5_kdcpreauth_edata_respond_fn respond, void *arg)
 {
     krb5_error_code retval;
     krb5_keyblock *client_key = NULL;
@@ -124,6 +125,7 @@
     int sam_type = 0;             /* unknown */
     krb5_db_entry *sam_db_entry = NULL, *client;
     krb5_data *encoded_challenge = NULL;
+    krb5_pa_data *pa_data = NULL;
 
     memset(&sc2, 0, sizeof(sc2));
     memset(&sc2b, 0, sizeof(sc2b));
@@ -134,7 +136,7 @@
     retval = sam_get_db_entry(context, client->princ, &sam_type,
                               &sam_db_entry);
     if (retval)
-        return retval;
+        goto cleanup;
     retval = cb->client_keys(context, rock, &client_key);
     if (retval)
         goto cleanup;
@@ -170,6 +172,9 @@
             goto cleanup;
         }
 
+        pa_data = k5alloc(sizeof(*pa_data), &retval);
+        if (pa_data == NULL)
+            goto cleanup;
         pa_data->magic = KV5M_PA_DATA;
         pa_data->pa_type = KRB5_PADATA_SAM_CHALLENGE_2;
         pa_data->contents = (krb5_octet *) encoded_challenge->data;
@@ -189,7 +194,7 @@
     if (sam_db_entry)
         krb5_db_free_principal(context, sam_db_entry);
     cb->free_keys(context, rock, client_key);
-    return retval;
+    (*respond)(arg, retval, pa_data);
 }
 
 static void



More information about the cvs-krb5 mailing list