From 942b07a276488c1935a21f2c13cf81b3fd708bea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Po=C5=82awski?= <ppolawsk@redhat.com>
Date: Thu, 6 Aug 2020 23:39:18 +0200
Subject: [PATCH] Utils: White space replace with another character

Function responsible for replacing white space
has wrong log levels set. It can create false positive
critical error messages broadcasted across the system
without any real reason.

This patch adjusts those log levels to be on the debug
level rather than criticar error level.

Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1818671
---
 src/util/string_utils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/string_utils.c b/src/util/string_utils.c
index 1215ec96a5..df37c6de78 100644
--- a/src/util/string_utils.c
+++ b/src/util/string_utils.c
@@ -53,10 +53,10 @@ char * sss_replace_space(TALLOC_CTX *mem_ctx,
     }
 
     if (strchr(orig_name, subst) != NULL) {
-        DEBUG(SSSDBG_CRIT_FAILURE,
+        DEBUG(SSSDBG_FUNC_DATA,
               "Input [%s] already contains replacement character [%c].\n",
               orig_name, subst);
-        sss_log(SSS_LOG_CRIT,
+        sss_log(SSS_LOG_DEBUG,
                 "Name [%s] already contains replacement character [%c]. " \
                 "No replacement will be done.\n",
                 orig_name, subst);
