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