mrc0mmand / rpms / openldap

Forked from rpms/openldap 3 years ago
Clone
Blob Blame History Raw
Correct log levels in check_password module.

Author: Matus Honek <mhonek@redhat.com>
Resolves: #1356158

diff --git a/check_password.c b/check_password.c
--- a/check_password.c
+++ b/check_password.c
@@ -108,7 +108,7 @@ char* chomp(char *s)
 static int set_quality (char *value)
 {
 #if defined(DEBUG)
-	syslog(LOG_NOTICE, "check_password: Setting quality to [%s]", value);
+	syslog(LOG_INFO, "check_password: Setting quality to [%s]", value);
 #endif
 
 	/* No need to require more quality than we can check for. */
@@ -120,7 +120,7 @@ static int set_quality (char *value)
 static int set_cracklib (char *value)
 {
 #if defined(DEBUG)
-	syslog(LOG_NOTICE, "check_password: Setting cracklib usage to [%s]", value);
+	syslog(LOG_INFO, "check_password: Setting cracklib usage to [%s]", value);
 #endif
 
 
@@ -131,7 +131,7 @@ static int set_cracklib (char *value)
 static int set_digit (char *value)
 {
 #if defined(DEBUG)
-	syslog(LOG_NOTICE, "check_password: Setting parameter to [%s]", value);
+	syslog(LOG_INFO, "check_password: Setting parameter to [%s]", value);
 #endif
 	if (!isdigit(*value) || (int) (value[0] - '0') > 9) return 0;
 	return (int) (value[0] - '0');
@@ -152,14 +152,14 @@ static validator valid_word (char *word)
 	int index = 0;
 
 #if defined(DEBUG)
-	syslog(LOG_NOTICE, "check_password: Validating parameter [%s]", word);
+	syslog(LOG_DEBUG, "check_password: Validating parameter [%s]", word);
 #endif
 
 	while (list[index].parameter != NULL) {
 		if (strlen(word) == strlen(list[index].parameter) &&
 		    strcmp(list[index].parameter, word) == 0) {
 #if defined(DEBUG)
-			syslog(LOG_NOTICE, "check_password: Parameter accepted.");
+			syslog(LOG_DEBUG, "check_password: Parameter accepted.");
 #endif
 			return list[index].dealer;
 		}
@@ -167,7 +167,7 @@ static validator valid_word (char *word)
 	}
 
 #if defined(DEBUG)
-	syslog(LOG_NOTICE, "check_password: Parameter rejected.");
+	syslog(LOG_DEBUG, "check_password: Parameter rejected.");
 #endif
 
 	return NULL;
@@ -203,7 +203,7 @@ static int read_config_file ()
 
 #if defined(DEBUG)
 		/* Debug traces to syslog. */
-		syslog(LOG_NOTICE, "check_password: Got line |%s|", line);
+		syslog(LOG_DEBUG, "check_password: Got line |%s|", line);
 #endif
 
 		while (isspace(*start) && isascii(*start)) start++;
@@ -212,7 +212,7 @@ static int read_config_file ()
 		if ( ispunct(*start)) {
 #if defined(DEBUG)
 			/* Debug traces to syslog. */
-			syslog(LOG_NOTICE, "check_password: Skipped line |%s|", line);
+			syslog(LOG_DEBUG, "check_password: Skipped line |%s|", line);
 #endif
 			continue;
 		}
@@ -227,7 +227,7 @@ static int read_config_file ()
 					if ((strncmp(keyWord,word,strlen(keyWord)) == 0) && (dealer = valid_word(word)) ) {
 
 #if defined(DEBUG)
-						syslog(LOG_NOTICE, "check_password: Word = %s, value = %s", word, value);
+						syslog(LOG_DEBUG, "check_password: Word = %s, value = %s", word, value);
 #endif
 
 						centry[i].value = chomp(value);
@@ -319,7 +319,7 @@ check_password (char *pPasswd, char **ppErrStr, Entry *pEntry)
 			if ( !nLower && (minLower < 1)) {
 				nLower = 1; nQuality++;
 #if defined(DEBUG)
-				syslog(LOG_NOTICE, "check_password: Found lower character - quality raise %d", nQuality);
+				syslog(LOG_DEBUG, "check_password: Found lower character - quality raise %d", nQuality);
 #endif
 			}
 			continue;
@@ -330,7 +330,7 @@ check_password (char *pPasswd, char **ppErrStr, Entry *pEntry)
 			if ( !nUpper && (minUpper < 1)) {
 				nUpper = 1; nQuality++;
 #if defined(DEBUG)
-				syslog(LOG_NOTICE, "check_password: Found upper character - quality raise %d", nQuality);
+				syslog(LOG_DEBUG, "check_password: Found upper character - quality raise %d", nQuality);
 #endif
 			}
 			continue;
@@ -341,7 +341,7 @@ check_password (char *pPasswd, char **ppErrStr, Entry *pEntry)
 			if ( !nDigit && (minDigit < 1)) {
 				nDigit = 1; nQuality++;
 #if defined(DEBUG)
-				syslog(LOG_NOTICE, "check_password: Found digit character - quality raise %d", nQuality);
+				syslog(LOG_DEBUG, "check_password: Found digit character - quality raise %d", nQuality);
 #endif
 			}
 			continue;
@@ -352,7 +352,7 @@ check_password (char *pPasswd, char **ppErrStr, Entry *pEntry)
 			if ( !nPunct && (minPunct < 1)) {
 				nPunct = 1; nQuality++;
 #if defined(DEBUG)
-				syslog(LOG_NOTICE, "check_password: Found punctuation character - quality raise %d", nQuality);
+				syslog(LOG_DEBUG, "check_password: Found punctuation character - quality raise %d", nQuality);
 #endif
 			}
 			continue;