From 64a2dbf9d49b5c0cd0c5acfbd09bdfc9a04f84ad Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 9 Nov 2006 04:06:37 +0000 Subject: [PATCH] ITS#4741 fix error check from external password quality module --- servers/slapd/overlays/ppolicy.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 ); -- 2.39.5