]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#4741 from HEAD
authorHoward Chu <hyc@openldap.org>
Fri, 10 Nov 2006 07:47:51 +0000 (07:47 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 10 Nov 2006 07:47:51 +0000 (07:47 +0000)
servers/slapd/overlays/ppolicy.c

index 645dd6f3d579687e60a70950f40b85a263be8503..14febffafd2ce7aaf11ed5435c8fe71c8d558400 100644 (file)
@@ -553,13 +553,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 );