From 57a33f4f063fa855869d46082245696ffc5117c1 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Fri, 11 May 1990 16:08:31 +0000 Subject: [PATCH] if the keytab isn't resolved, then don't try to use it git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@847 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/rd_req_dec.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/lib/krb5/krb/rd_req_dec.c b/src/lib/krb5/krb/rd_req_dec.c index 695e7bf81..363bae800 100644 --- a/src/lib/krb5/krb/rd_req_dec.c +++ b/src/lib/krb5/krb/rd_req_dec.c @@ -100,14 +100,16 @@ krb5_tkt_authent *tktauthent; /* use default keytab */ retval = krb5_kt_default(&keytabid); } - retval = krb5_kt_get_entry(keytabid, req->ticket->server, - req->ticket->skvno, &ktentry); - (void) krb5_kt_close(keytabid); if (!retval) { - retval = krb5_copy_keyblock(&ktentry.key, &tkt_key_real); - tkt_key = &tkt_key_real; + retval = krb5_kt_get_entry(keytabid, req->ticket->server, + req->ticket->skvno, &ktentry); + (void) krb5_kt_close(keytabid); + if (!retval) { + retval = krb5_copy_keyblock(&ktentry.key, &tkt_key_real); + tkt_key = &tkt_key_real; + } + (void) krb5_kt_free_entry(&ktentry); } - (void) krb5_kt_free_entry(&ktentry); } if (retval) return retval; /* some error in getting the key */ -- 2.26.2