From ebd4227aa23f235f369dbbbb382c461a49d6cebb Mon Sep 17 00:00:00 2001 From: John Kohl Date: Mon, 7 May 1990 17:14:08 +0000 Subject: [PATCH] use local creds to avoid bashing git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@765 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/file/fcc_retrv.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/lib/krb5/ccache/file/fcc_retrv.c b/src/lib/krb5/ccache/file/fcc_retrv.c index 14ba144de..6107f660e 100644 --- a/src/lib/krb5/ccache/file/fcc_retrv.c +++ b/src/lib/krb5/ccache/file/fcc_retrv.c @@ -59,30 +59,32 @@ krb5_fcc_retrieve(id, whichfields, mcreds, creds) krb5_cc_cursor cursor; krb5_error_code kret; + krb5_creds fetchcreds; kret = krb5_fcc_start_seq_get(id, &cursor); if (kret != KRB5_OK) return kret; - while ((kret = krb5_fcc_next_cred(id, &cursor, creds)) == KRB5_OK) { - if (standard_fields_match(mcreds, creds) + while ((kret = krb5_fcc_next_cred(id, &cursor, &fetchcreds)) == KRB5_OK) { + if (standard_fields_match(mcreds, &fetchcreds) && (! set(KRB5_TC_MATCH_IS_SKEY) || - mcreds->is_skey == creds->is_skey) + mcreds->is_skey == fetchcreds.is_skey) && (! set(KRB5_TC_MATCH_FLAGS_EXACT) || - mcreds->ticket_flags == creds->ticket_flags) + mcreds->ticket_flags == fetchcreds.ticket_flags) && (! set(KRB5_TC_MATCH_FLAGS) || - flags_match(mcreds->ticket_flags, creds->ticket_flags)) + flags_match(mcreds->ticket_flags, fetchcreds.ticket_flags)) && (! set(KRB5_TC_MATCH_TIMES_EXACT) || - times_match_exact(&mcreds->times, &creds->times)) + times_match_exact(&mcreds->times, &fetchcreds.times)) && (! set(KRB5_TC_MATCH_TIMES) || - times_match(&mcreds->times, &creds->times))) + times_match(&mcreds->times, &fetchcreds.times))) { krb5_fcc_end_seq_get(id, &cursor); + *creds = fetchcreds; return KRB5_OK; } -- 2.26.2