diff options
author | Sam Hartman <hartmans@mit.edu> | 2003-06-03 21:36:00 +0000 |
---|---|---|
committer | Sam Hartman <hartmans@mit.edu> | 2003-06-03 21:36:00 +0000 |
commit | 242abeb6abea8f895b1402e014a09fde778d8c6e (patch) | |
tree | 2b3e56f2265feb27245f237a4bd88cee8a776f46 /src/lib | |
parent | bddc8d713dc51a12adc4b1a6302c89fff6613dd3 (diff) | |
download | krb5-242abeb6abea8f895b1402e014a09fde778d8c6e.tar.gz krb5-242abeb6abea8f895b1402e014a09fde778d8c6e.tar.xz krb5-242abeb6abea8f895b1402e014a09fde778d8c6e.zip |
Save a copy of the ciphertext from the kdc rather than trying to
decrypt the already decrypted text each time through the loop.
Ticket: 1554
Tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15551 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/krb4/ChangeLog | 5 | ||||
-rw-r--r-- | src/lib/krb4/g_in_tkt.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index f16f07c45..d72159141 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,8 @@ +2003-06-03 Sam Hartman <hartmans@mit.edu> + + * g_in_tkt.c (krb_get_in_tkt_preauth_creds): Keep copy of + ciphertext while trying different keyprocs + 2003-06-02 Tom Yu <tlyu@mit.edu> * change_password.c (krb_change_password): Explicitly zero the diff --git a/src/lib/krb4/g_in_tkt.c b/src/lib/krb4/g_in_tkt.c index 4d5286a98..58a91b00d 100644 --- a/src/lib/krb4/g_in_tkt.c +++ b/src/lib/krb4/g_in_tkt.c @@ -424,6 +424,9 @@ krb_get_in_tkt_preauth_creds(user, instance, realm, service, sinstance, life, /* Attempt to decrypt the reply. Loop trying password_to_key algorithms until we succeed or we get an error other than "bad password" */ do { + KTEXT_ST cip_copy_st; + memcpy(&cip_copy_st, &cip_st, sizeof(cip_st)); + cip = &cip_copy_st; if (decrypt_proc == NULL) { decrypt_tkt (user, instance, realm, arg, keyprocs[i], &cip); } else { @@ -432,6 +435,7 @@ krb_get_in_tkt_preauth_creds(user, instance, realm, service, sinstance, life, kerror = krb_parse_in_tkt_creds(user, instance, realm, service, sinstance, life, cip, byteorder, creds); } while ((keyprocs [++i] != NULL) && (kerror == INTK_BADPW)); + cip = &cip_st; /* Fill in the local address if the caller wants it */ if (laddrp != NULL) { |