diff options
author | Tom Yu <tlyu@mit.edu> | 2012-01-11 04:18:59 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2012-01-11 04:18:59 +0000 |
commit | a5ef59e68989019a1635d16fd91e103239958283 (patch) | |
tree | 02c364d793241280da4ea27e33153353a9f407cc | |
parent | 2d533e0b65957357a3462e93ec4a946d54b8c713 (diff) | |
download | krb5-a5ef59e68989019a1635d16fd91e103239958283.zip krb5-a5ef59e68989019a1635d16fd91e103239958283.tar.gz krb5-a5ef59e68989019a1635d16fd91e103239958283.tar.bz2 |
krb5_server_decrypt_ticket_keytab wrongly succeeds
Pull up r25584 from trunk
------------------------------------------------------------------------
r25584 | ghudson | 2011-12-12 19:53:56 -0500 (Mon, 12 Dec 2011) | 9 lines
ticket: 7051
subject: krb5_server_decrypt_ticket_keytab wrongly succeeds
If krb5_server_decrypt_ticket_keytab doesn't find a key of the
appropriate enctype in an iterable keytab, it returns 0 (without
decrypting the ticket) due to a misplaced initialization of retval.
This bug causes kinit -k to claim "keytab entry valid" when it
shouldn't. Reported by mark@mproehl.net.
ticket: 7069
version_fixed: 1.9.3
status: resolved
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-9@25642 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/lib/krb5/krb/srv_dec_tkt.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/krb5/krb/srv_dec_tkt.c b/src/lib/krb5/krb/srv_dec_tkt.c index f266fa5..b8660fe 100644 --- a/src/lib/krb5/krb/srv_dec_tkt.c +++ b/src/lib/krb5/krb/srv_dec_tkt.c @@ -79,8 +79,6 @@ krb5_server_decrypt_ticket_keytab(krb5_context context, krb5_error_code retval; krb5_keytab_entry ktent; - retval = KRB5_KT_NOTFOUND; - if (keytab->ops->start_seq_get == NULL) { retval = krb5_kt_get_entry(context, keytab, ticket->server, @@ -99,6 +97,7 @@ krb5_server_decrypt_ticket_keytab(krb5_context context, if (retval != 0) goto map_error; + retval = KRB5_KT_NOTFOUND; while ((code = krb5_kt_next_entry(context, keytab, &ktent, &cursor)) == 0) { if (ktent.key.enctype != ticket->enc_part.enctype) |