From: Howard Chu Date: Thu, 9 Nov 2006 04:06:37 +0000 (+0000) Subject: ITS#4741 fix error check from external password quality module X-Git-Tag: OPENLDAP_REL_ENG_2_3_MP~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=64a2dbf9d49b5c0cd0c5acfbd09bdfc9a04f84ad;p=openldap ITS#4741 fix error check from external password quality module --- diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index 68216d445a..ad2032409b 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -645,13 +645,12 @@ check_password_quality( struct berval *cred, PassPolicy *pp, LDAPPasswordPolicyE ldap_pvt_thread_mutex_lock( &chk_syntax_mutex ); ok = prog( cred->bv_val, &txt, e ); ldap_pvt_thread_mutex_unlock( &chk_syntax_mutex ); - if (txt) { + if (ok != LDAP_SUCCESS) { Debug(LDAP_DEBUG_ANY, "check_password_quality: module error: (%s) %s.[%d]\n", - pp->pwdCheckModule, txt, ok ); + pp->pwdCheckModule, txt ? txt : "", ok ); free(txt); - } else - ok = LDAP_SUCCESS; + } } lt_dlclose( mod );