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