check config file for kadmin/use_v4_salt before zapping version 4

salts


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4952 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1998-05-26 12:03:30 +00:00
parent f66da7957e
commit e950ece0ef

View File

@@ -51,9 +51,12 @@ _kadm5_set_keys(kadm5_server_context *context,
krb5_get_salt(ent->principal, &salt);
for(i = 0; i < ent->keys.len; i++){
key = &ent->keys.val[i];
if(key->salt && key->salt->type == hdb_pw_salt &&
key->salt->salt.length != 0){
/* zap old salt, but not v4 salts */
if(key->salt &&
key->salt->type == hdb_pw_salt &&
(key->salt->salt.length != 0 ||
!krb5_config_get_bool(context->context, NULL,
"kadmin", "use_v4_salt", NULL))){
/* zap old salt, possibly keeping version 4 salts */
free_Salt(key->salt);
key->salt = NULL;
}