mrc0mmand / rpms / openldap

Forked from rpms/openldap 3 years ago
Clone

Blame SOURCES/openldap-ppolicy-loglevels.patch

95f81a
Correct log levels in ppolicy overlay.
95f81a
95f81a
Author: Matus Honek <mhonek@redhat.com>
95f81a
Resolves: #1356158
95f81a
95f81a
diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c
95f81a
--- a/servers/slapd/overlays/ppolicy.c
95f81a
+++ b/servers/slapd/overlays/ppolicy.c
95f81a
@@ -643,7 +643,7 @@ check_password_quality( struct berval *cred, PassPolicy *pp, LDAPPasswordPolicyE
95f81a
 		if ((mod = lt_dlopen( pp->pwdCheckModule )) == NULL) {
95f81a
 			err = lt_dlerror();
95f81a
 
95f81a
-			Debug(LDAP_DEBUG_ANY,
95f81a
+			Log3(LDAP_DEBUG_ANY, LDAP_LEVEL_WARNING,
95f81a
 			"check_password_quality: lt_dlopen failed: (%s) %s.\n",
95f81a
 				pp->pwdCheckModule, err, 0 );
95f81a
 			ok = LDAP_OTHER; /* internal error */
95f81a
@@ -658,7 +658,7 @@ check_password_quality( struct berval *cred, PassPolicy *pp, LDAPPasswordPolicyE
95f81a
 			if ((prog = lt_dlsym( mod, "check_password" )) == NULL) {
95f81a
 				err = lt_dlerror();
95f81a
 			    
95f81a
-				Debug(LDAP_DEBUG_ANY,
95f81a
+				Log3(LDAP_DEBUG_ANY, LDAP_LEVEL_WARNING,
95f81a
 					"check_password_quality: lt_dlsym failed: (%s) %s.\n",
95f81a
 					pp->pwdCheckModule, err, 0 );
95f81a
 				ok = LDAP_OTHER;
95f81a
@@ -667,7 +667,7 @@ check_password_quality( struct berval *cred, PassPolicy *pp, LDAPPasswordPolicyE
95f81a
 				ok = prog( ptr, txt, e );
95f81a
 				ldap_pvt_thread_mutex_unlock( &chk_syntax_mutex );
95f81a
 				if (ok != LDAP_SUCCESS) {
95f81a
-					Debug(LDAP_DEBUG_ANY,
95f81a
+					Log3(LDAP_DEBUG_ANY, LDAP_LEVEL_WARNING,
95f81a
 						"check_password_quality: module error: (%s) %s.[%d]\n",
95f81a
 						pp->pwdCheckModule, *txt ? *txt : "", ok );
95f81a
 				}