ticket 2049
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 19 Dec 2003 06:53:24 +0000 (06:53 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 19 Dec 2003 06:53:24 +0000 (06:53 +0000)
fix an incorrect level of indirection for a krb5_creds data structure.

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

src/lib/krb5/ccache/ChangeLog
src/lib/krb5/ccache/cc_mslsa.c

index 5eab3ca8ddbd96388cbe1956d0d48b1b665b278e..71158eaf3a6d914f4435a1e052021c99064a55c4 100644 (file)
@@ -1,3 +1,8 @@
+2003-12-19  Jeffrey Altman <jaltman@mit.edu>
+              
+   * cc_mslsa.c: fix indirection of a krb5_creds structure which
+     is passed into MSCredToMITCred().
+
 2003-12-18  Jeffrey Altman <jaltman@mit.edu>
 
    * cc_retr.c:  Extract the test to determine if a credential matches
index 464fd9527c80ada8c46418ce5a99e317f12318c7..6d1dfc5a4ac088e09fc09ce8d301c12077a11a26 100644 (file)
@@ -1299,7 +1299,9 @@ krb5_lcc_retrieve(krb5_context context, krb5_ccache id, krb5_flags whichfields,
     krb5_lcc_data *data = (krb5_lcc_data *)id->data;
     KERB_EXTERNAL_TICKET *msticket = 0;
     krb5_creds * mcreds_noflags;
-    krb5_creds * fetchcreds;
+    krb5_creds   fetchcreds;
+
+    memset(&fetchcreds, 0, sizeof(krb5_creds));
 
     /* first try to find out if we have an existing ticket which meets the requirements */
     kret = krb5_cc_retrieve_cred_default (context, id, whichfields, mcreds, creds);
@@ -1335,15 +1337,15 @@ krb5_lcc_retrieve(krb5_context context, krb5_ccache id, krb5_flags whichfields,
     }
 
     /* convert the ticket */
-    MSCredToMITCred(msticket, context, fetchcreds);
+    MSCredToMITCred(msticket, context, &fetchcreds);
 
     /* check to see if this ticket matches the request using logic from
      * krb5_cc_retrieve_cred_default()
      */
-    if ( krb5int_cc_creds_match_request(context, whichfields, mcreds, fetchcreds) ) {
-        creds = fetchcreds;
+    if ( krb5int_cc_creds_match_request(context, whichfields, mcreds, &fetchcreds) ) {
+        *creds = fetchcreds;
     } else {
-        krb5_free_creds(context, fetchcreds);
+        krb5_free_cred_contents(context, &fetchcreds);
         kret = KRB5_CC_NOTFOUND;
     }