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:
		| @@ -51,9 +51,12 @@ _kadm5_set_keys(kadm5_server_context *context, | |||||||
|     krb5_get_salt(ent->principal, &salt); |     krb5_get_salt(ent->principal, &salt); | ||||||
|     for(i = 0; i < ent->keys.len; i++){ |     for(i = 0; i < ent->keys.len; i++){ | ||||||
| 	key = &ent->keys.val[i]; | 	key = &ent->keys.val[i]; | ||||||
| 	if(key->salt && key->salt->type == hdb_pw_salt &&  | 	if(key->salt &&  | ||||||
| 	   key->salt->salt.length != 0){ | 	   key->salt->type == hdb_pw_salt && | ||||||
| 	    /* zap old salt, but not v4 salts */ | 	   (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); | 	    free_Salt(key->salt); | ||||||
| 	    key->salt = NULL; | 	    key->salt = NULL; | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Johan Danielsson
					Johan Danielsson