* kdc_preauth.c (return_padata): Allocate a padata context if not
authorSam Hartman <hartmans@mit.edu>
Thu, 5 Oct 2006 21:28:58 +0000 (21:28 +0000)
committerSam Hartman <hartmans@mit.edu>
Thu, 5 Oct 2006 21:28:58 +0000 (21:28 +0000)
already allocated.  In the preauth_required path check will not be
called to set up the context first.

ticket: 4377
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18650 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/kdc_preauth.c

index 1b11de3026b24d2b98ed293623ca8cb5d5166746..936c9b6f31a8ff64e8782d562754a138369915d3 100644 (file)
@@ -989,6 +989,9 @@ return_padata(krb5_context context, krb5_db_entry *client, krb5_data *req_pkt,
     void **                    pa_context;
     krb5_boolean               key_modified;
     krb5_keyblock              original_key;
+    if ((!*padata_context)&& (make_padata_context(context, padata_context) != 0)) {
+       return KRB5KRB_ERR_GENERIC;
+    }
 
     for (ap = preauth_systems; ap->type != -1; ap++) {
        if (ap->return_padata)