mrc0mmand / rpms / openldap

Forked from rpms/openldap 3 years ago
Clone

Blame SOURCES/check-password-loglevels.patch

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