mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-03 20:40:05 -05:00
ITS#7981 Move default hash selection to slap_passwd_hash_type
This commit is contained in:
parent
9d90f55c83
commit
dad90d66c5
1 changed files with 10 additions and 9 deletions
|
|
@ -572,25 +572,26 @@ slap_passwd_hash_type(
|
|||
new->bv_len = 0;
|
||||
new->bv_val = NULL;
|
||||
|
||||
if ( hash == NULL ) {
|
||||
if ( default_passwd_hash ) {
|
||||
hash = default_passwd_hash[0];
|
||||
}
|
||||
if ( !hash ) {
|
||||
hash = (char *)defhash[0];
|
||||
}
|
||||
}
|
||||
assert( hash != NULL );
|
||||
|
||||
lutil_passwd_hash( cred , hash, new, text );
|
||||
}
|
||||
|
||||
void
|
||||
slap_passwd_hash(
|
||||
struct berval * cred,
|
||||
struct berval * new,
|
||||
const char **text )
|
||||
{
|
||||
char *hash = NULL;
|
||||
if ( default_passwd_hash ) {
|
||||
hash = default_passwd_hash[0];
|
||||
}
|
||||
if ( !hash ) {
|
||||
hash = (char *)defhash[0];
|
||||
}
|
||||
|
||||
slap_passwd_hash_type( cred, new, hash, text );
|
||||
slap_passwd_hash_type( cred, new, NULL, text );
|
||||
}
|
||||
|
||||
#ifdef SLAPD_CRYPT
|
||||
|
|
|
|||
Loading…
Reference in a new issue