mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
Fix check_password with {cleartext} passwords
This commit is contained in:
parent
20f1cc2702
commit
68246fb76d
@ -643,6 +643,11 @@ check_password_quality( struct berval *cred, PassPolicy *pp, LDAPPasswordPolicyE
|
||||
pp->pwdCheckModule, err, 0 );
|
||||
ok = LDAP_OTHER; /* internal error */
|
||||
} else {
|
||||
/* FIXME: the error message ought to be passed thru a
|
||||
* struct berval, with preallocated buffer and size
|
||||
* passed in. Module can still allocate a buffer for
|
||||
* it if the provided one is too small.
|
||||
*/
|
||||
int (*prog)( char *passwd, char **text, Entry *ent );
|
||||
|
||||
if ((prog = lt_dlsym( mod, "check_password" )) == NULL) {
|
||||
@ -656,7 +661,7 @@ check_password_quality( struct berval *cred, PassPolicy *pp, LDAPPasswordPolicyE
|
||||
char *txt = NULL;
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &chk_syntax_mutex );
|
||||
ok = prog( cred->bv_val, &txt, e );
|
||||
ok = prog( ptr, &txt, e );
|
||||
ldap_pvt_thread_mutex_unlock( &chk_syntax_mutex );
|
||||
if (ok != LDAP_SUCCESS) {
|
||||
Debug(LDAP_DEBUG_ANY,
|
||||
|
Loading…
Reference in New Issue
Block a user