From: Greg Hudson Date: Mon, 28 Sep 2009 01:47:32 +0000 (+0000) Subject: Fix a few problems introduced by r22787 X-Git-Tag: krb5-1.8-alpha1~333 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=11e83138c614b0f8eeff573ca1b2fcbb562302a1;p=krb5.git Fix a few problems introduced by r22787 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22790 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/get_creds.c b/src/lib/krb5/krb/get_creds.c index 771153ea9..607ea9f61 100644 --- a/src/lib/krb5/krb/get_creds.c +++ b/src/lib/krb5/krb/get_creds.c @@ -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) diff --git a/src/lib/krb5/krb/int-proto.h b/src/lib/krb5/krb/int-proto.h index 1210e4f28..6da6da151 100644 --- a/src/lib/krb5/krb/int-proto.h +++ b/src/lib/krb5/krb/int-proto.h @@ -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)