diff options
author | John Kohl <jtkohl@mit.edu> | 1990-05-11 16:08:31 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1990-05-11 16:08:31 +0000 |
commit | 57a33f4f063fa855869d46082245696ffc5117c1 (patch) | |
tree | 53635214f75f93b1d4a0062bb9d4c953027a411f /src/lib | |
parent | 80e37097b42284321c567e06fa834bd2a95fccba (diff) | |
download | krb5-57a33f4f063fa855869d46082245696ffc5117c1.tar.gz krb5-57a33f4f063fa855869d46082245696ffc5117c1.tar.xz krb5-57a33f4f063fa855869d46082245696ffc5117c1.zip |
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
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/krb5/krb/rd_req_dec.c | 14 |
1 files 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 695e7bf819..363bae8001 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 */ |