Fix a few problems introduced by r22787
authorGreg Hudson <ghudson@mit.edu>
Mon, 28 Sep 2009 01:47:32 +0000 (01:47 +0000)
committerGreg Hudson <ghudson@mit.edu>
Mon, 28 Sep 2009 01:47:32 +0000 (01:47 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22790 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/get_creds.c
src/lib/krb5/krb/int-proto.h

index 771153ea9f4f33f543d2f2fa412e4793139c5129..607ea9f61e14fde7ac6b963b2c58db68d68cda44 100644 (file)
@@ -117,7 +117,8 @@ krb5_get_credentials(krb5_context context, krb5_flags options,
     krb5_error_code retval;
     krb5_creds mcreds, *ncreds, **tgts, **tgts_iter;
     krb5_flags fields;
-    int not_ktype, kdcopt = 0;
+    krb5_boolean not_ktype;
+    int kdcopt = 0;
 
     *out_creds = NULL;
 
@@ -147,17 +148,14 @@ krb5_get_credentials(krb5_context context, krb5_flags options,
            return 0;
        }
        free(ncreds);
+       ncreds = NULL;
        if ((retval != KRB5_CC_NOTFOUND && retval != KRB5_CC_NOT_KTYPE)
            || options & KRB5_GC_CACHED)
            return retval;
+       not_ktype = (retval == KRB5_CC_NOT_KTYPE);
     } else if (options & KRB5_GC_CACHED)
        return KRB5_CC_NOTFOUND;
 
-    if (retval == KRB5_CC_NOT_KTYPE)
-       not_ktype = 1;
-    else
-       not_ktype = 0;
-
     if (options & KRB5_GC_CANONICALIZE)
        kdcopt |= KDC_OPT_CANONICALIZE;
     if (options & KRB5_GC_FORWARDABLE)
index 1210e4f28524d36a0c3f18a26af5b9c7240e74fb..6da6da151d567df3c14f0b4b11fc492deb3bd11d 100644 (file)
@@ -60,9 +60,9 @@ krb5_get_cred_from_kdc_opt(krb5_context context, krb5_ccache ccache,
                           krb5_creds ***tgts, int kdcopt);
 
 krb5_error_code
-krb5_construct_matching_creds(krb5_context context, krb5_flags options,
-                             krb5_creds *in_creds, krb5_creds *mcreds,
-                             krb5_flags *fields);
+krb5int_construct_matching_creds(krb5_context context, krb5_flags options,
+                                krb5_creds *in_creds, krb5_creds *mcreds,
+                                krb5_flags *fields);
 
 #define in_clock_skew(date, now) (labs((date)-(now)) < context->clockskew)