sbonazzo / rpms / cyrus-sasl

Forked from rpms/cyrus-sasl 2 years ago
Clone

Blame SOURCES/cyrus-sasl-2.1.27-Emit-debug-log-only-in-case-of-errors.patch

df6e3e
From ec070b2e83a4ee698c08d6d68c205aea4d90b0bb Mon Sep 17 00:00:00 2001
df6e3e
From: Simo Sorce <simo@redhat.com>
df6e3e
Date: Tue, 5 May 2020 14:31:10 -0400
df6e3e
Subject: [PATCH] Emit debug log only in case of errors
df6e3e
df6e3e
Backport of commit id:
df6e3e
ccc5e547d4b40ee2b182a9945f8f6cc10b4fdf48
df6e3e
df6e3e
Signed-off-by: Simo Sorce <simo@redhat.com>
df6e3e
---
df6e3e
 plugins/gssapi.c | 7 +++----
df6e3e
 1 file changed, 3 insertions(+), 4 deletions(-)
df6e3e
df6e3e
diff --git a/plugins/gssapi.c b/plugins/gssapi.c
df6e3e
index 7480316..6bcd78e 100644
df6e3e
--- a/plugins/gssapi.c
df6e3e
+++ b/plugins/gssapi.c
df6e3e
@@ -1444,9 +1444,6 @@ gssapi_server_mech_step(void *conn_context,
df6e3e
 
df6e3e
     if (text == NULL) return SASL_BADPROT;
df6e3e
 
df6e3e
-    params->utils->log(params->utils->conn, SASL_LOG_DEBUG,
df6e3e
-		       "GSSAPI server step %d\n", text->state);
df6e3e
-
df6e3e
     switch (text->state) {
df6e3e
 
df6e3e
     case SASL_GSSAPI_STATE_AUTHNEG:
df6e3e
@@ -1496,8 +1493,10 @@ gssapi_server_mech_step(void *conn_context,
df6e3e
 	}
df6e3e
 
df6e3e
 	oparams->doneflag = 1;
df6e3e
+    } else {
df6e3e
+        params->utils->log(params->utils->conn, SASL_LOG_DEBUG,
df6e3e
+		           "GSSAPI server step failed: %d\n", text->state);
df6e3e
     }
df6e3e
-    
df6e3e
     return ret;
df6e3e
 }
df6e3e
 
df6e3e
-- 
df6e3e
2.18.2
df6e3e