krb5 commit [krb5-1.12]: Reset key-generation parameters for each enctype
Tom Yu
tlyu at MIT.EDU
Mon Oct 28 15:20:38 EDT 2013
https://github.com/krb5/krb5/commit/fe82fb949acd259f0793395757366540c836b5be
commit fe82fb949acd259f0793395757366540c836b5be
Author: Ben Kaduk <kaduk at mit.edu>
Date: Fri Oct 25 14:00:29 2013 -0400
Reset key-generation parameters for each enctype
In add_key_pwd, initialize s2k_params to NULL inside the loop over
enctypes instead of outside the loop, so that if the afs3 salt type
is used it does not contaminate later enctype/salt pairs in the list.
(cherry picked from commit 381cf01afb13ad28de0927de37f8e1d12749bf49)
ticket: 7733
version_fixed: 1.12
status: resolved
src/lib/kdb/kdb_cpw.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/lib/kdb/kdb_cpw.c b/src/lib/kdb/kdb_cpw.c
index 7b00fcf..5481553 100644
--- a/src/lib/kdb/kdb_cpw.c
+++ b/src/lib/kdb/kdb_cpw.c
@@ -389,7 +389,7 @@ add_key_pwd(context, master_key, ks_tuple, ks_tuple_count, passwd,
krb5_keysalt key_salt;
krb5_keyblock key;
krb5_data pwd;
- krb5_data afs_params = string2data("\1"), *s2k_params = NULL;
+ krb5_data afs_params = string2data("\1"), *s2k_params;
int i, j, k;
krb5_key_data tmp_key_data;
krb5_key_data *tptr;
@@ -402,6 +402,7 @@ add_key_pwd(context, master_key, ks_tuple, ks_tuple_count, passwd,
krb5_boolean similar;
similar = 0;
+ s2k_params = NULL;
/*
* We could use krb5_keysalt_iterate to replace this loop, or use
More information about the cvs-krb5
mailing list