Blame SOURCES/Downgrade-missing-auth-headers-ERROR-to-INFO.patch

a1faee
From e2515cdeae0f6693c04d4569644892c3fd5eebe6 Mon Sep 17 00:00:00 2001
a1faee
From: Robbie Harwood <rharwood@redhat.com>
a1faee
Date: Thu, 2 Nov 2017 13:30:57 -0400
a1faee
Subject: [PATCH] Downgrade missing auth headers ERROR to INFO
a1faee
a1faee
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
a1faee
Reviewed-by: Simo Sorce <simo@redhat.com>
a1faee
Resolves: #155
a1faee
Merges: #156
a1faee
(cherry picked from commit 07b0d3c568b8086fcf1558e9b1745df99bb15081)
a1faee
---
a1faee
 src/mod_auth_gssapi.c | 17 +++++++++++++++--
a1faee
 1 file changed, 15 insertions(+), 2 deletions(-)
a1faee
a1faee
diff --git a/src/mod_auth_gssapi.c b/src/mod_auth_gssapi.c
a1faee
index c2dd039..1717837 100644
a1faee
--- a/src/mod_auth_gssapi.c
a1faee
+++ b/src/mod_auth_gssapi.c
a1faee
@@ -91,6 +91,19 @@ static const char *mag_err_text(enum mag_err_code err)
a1faee
     }
a1faee
 }
a1faee
 
a1faee
+static void mag_post_info(request_rec *req, struct mag_config *cfg,
a1faee
+                          enum mag_err_code err, const char *msg)
a1faee
+{
a1faee
+    const char *text = NULL;
a1faee
+
a1faee
+    if (cfg->enverrs) {
a1faee
+        mag_publish_error(req, 0, 0, text ? text : msg, mag_err_text(err));
a1faee
+    }
a1faee
+
a1faee
+    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, req, "%s %s", mag_err_text(err),
a1faee
+                  text ? text : msg);
a1faee
+}
a1faee
+
a1faee
 static void mag_post_error(request_rec *req, struct mag_config *cfg,
a1faee
                            enum mag_err_code err, uint32_t maj, uint32_t min,
a1faee
                            const char *msg)
a1faee
@@ -957,8 +970,8 @@ static int mag_auth(request_rec *req)
a1faee
 
a1faee
     /* We can proceed only if we do have an auth header */
a1faee
     if (!auth_header) {
a1faee
-        mag_post_error(req, cfg, MAG_NO_AUTH, 0, 0,
a1faee
-                       "Client did not send any authentication headers");
a1faee
+        mag_post_info(req, cfg, MAG_NO_AUTH,
a1faee
+                      "Client did not send any authentication headers");
a1faee
         goto done;
a1faee
     }
a1faee