summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/krb/get_creds.c10
-rw-r--r--src/lib/krb5/krb/int-proto.h6
2 files changed, 7 insertions, 9 deletions
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)