krb5 commit [krb5-1.11]: Fix sam2 client preauth after salt changes
Tom Yu
tlyu at MIT.EDU
Tue Oct 30 10:24:58 EDT 2012
https://github.com/krb5/krb5/commit/e9aa891fcdb4c08d39902ab89afb268042b60c86
commit e9aa891fcdb4c08d39902ab89afb268042b60c86
Author: Greg Hudson <ghudson at mit.edu>
Date: Thu Oct 18 13:11:28 2012 -0400
Fix sam2 client preauth after salt changes
Commit bc096a77ffdab283d77c2e0fc1fdd15b9f77eb41 altered the internal
contracts relating to salts, but neglected to adjust the sam2 preauth
code to match. Do that now.
(cherry picked from commit 787cc1e24117e57a9173aaaa16935f6488eb3fec)
ticket: 7415
version_fixed: 1.11
status: resolved
src/lib/krb5/krb/preauth_sam2.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lib/krb5/krb/preauth_sam2.c b/src/lib/krb5/krb/preauth_sam2.c
index a5f6395..2280207 100644
--- a/src/lib/krb5/krb/preauth_sam2.c
+++ b/src/lib/krb5/krb/preauth_sam2.c
@@ -153,6 +153,7 @@ sam2_process(krb5_context context, krb5_clpreauth_moddata moddata,
/* Go ahead and get it now, preserving the ordering of */
/* prompts for the user. */
+ salt = (*rock->default_salt) ? NULL : rock->salt;
retval = (*rock->gak_fct)(context, request->client, sc2b->sam_etype,
prompter, prompter_data, rock->salt,
rock->s2kparams, rock->as_key,
@@ -199,8 +200,7 @@ sam2_process(krb5_context context, krb5_clpreauth_moddata moddata,
krb5int_set_prompt_types(context, (krb5_prompt_type *)NULL);
/* Generate salt used by string_to_key() */
- salt = rock->salt;
- if (((int) salt->length == -1) && (salt->data == NULL)) {
+ if (*rock->default_salt) {
if ((retval =
krb5_principal2salt(context, request->client, &defsalt))) {
krb5_free_sam_challenge_2(context, sc2);
@@ -209,6 +209,7 @@ sam2_process(krb5_context context, krb5_clpreauth_moddata moddata,
}
salt = &defsalt;
} else {
+ salt = rock->salt;
defsalt.length = 0;
}
More information about the cvs-krb5
mailing list