From 9fa0006ee960181e0d2ed41bf291a1ec1b1d6378 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 26 Feb 2022 22:50:52 +0000 Subject: [PATCH] Cyrus SASL: keep rejectlog output to single lines --- src/src/auths/cyrus_sasl.c | 8 ++++---- test/rejectlog/3800 | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/src/auths/cyrus_sasl.c b/src/src/auths/cyrus_sasl.c index 2aa95dfbb..17e92bb7c 100644 --- a/src/src/auths/cyrus_sasl.c +++ b/src/src/auths/cyrus_sasl.c @@ -378,7 +378,7 @@ for (rc = SASL_CONTINUE; rc == SASL_CONTINUE; ) HDEBUG(D_auth) debug_printf("Cyrus SASL library will not tell us the username: %s\n", sasl_errstring(rc, NULL, NULL)); - log_write(0, LOG_REJECT, "%s authenticator (%s):\n " + log_write(0, LOG_REJECT, "%s authenticator (%s): " "Cyrus SASL username fetch problem: %s", ablock->name, ob->server_mech, sasl_errstring(rc, NULL, NULL)); sasl_dispose(&conn); @@ -397,7 +397,7 @@ for (rc = SASL_CONTINUE; rc == SASL_CONTINUE; ) /* these are considered permanent failure codes */ HDEBUG(D_auth) debug_printf("Cyrus SASL permanent failure %d (%s)\n", rc, sasl_errstring(rc, NULL, NULL)); - log_write(0, LOG_REJECT, "%s authenticator (%s):\n " + log_write(0, LOG_REJECT, "%s authenticator (%s): " "Cyrus SASL permanent failure: %s", ablock->name, ob->server_mech, sasl_errstring(rc, NULL, NULL)); sasl_dispose(&conn); @@ -427,7 +427,7 @@ for (rc = SASL_CONTINUE; rc == SASL_CONTINUE; ) HDEBUG(D_auth) debug_printf("Cyrus SASL library will not tell us the SSF: %s\n", sasl_errstring(rc, NULL, NULL)); - log_write(0, LOG_REJECT, "%s authenticator (%s):\n " + log_write(0, LOG_REJECT, "%s authenticator (%s): " "Cyrus SASL SSF value not available: %s", ablock->name, ob->server_mech, sasl_errstring(rc, NULL, NULL)); sasl_dispose(&conn); @@ -441,7 +441,7 @@ for (rc = SASL_CONTINUE; rc == SASL_CONTINUE; ) { HDEBUG(D_auth) debug_printf("Exim does not implement SASL wrapping (needed for SSF %d).\n", negotiated_ssf); - log_write(0, LOG_REJECT, "%s authenticator (%s):\n " + log_write(0, LOG_REJECT, "%s authenticator (%s): " "Cyrus SASL SSF %d not supported by Exim", ablock->name, ob->server_mech, negotiated_ssf); sasl_dispose(&conn); sasl_done(); diff --git a/test/rejectlog/3800 b/test/rejectlog/3800 index 47511b748..430e7b913 100644 --- a/test/rejectlog/3800 +++ b/test/rejectlog/3800 @@ -1,5 +1,4 @@ ******** SERVER ******** -1999-03-02 09:44:33 sasl2 authenticator (PLAIN): - Cyrus SASL permanent failure: user not found +1999-03-02 09:44:33 sasl2 authenticator (PLAIN): Cyrus SASL permanent failure: generic failure 1999-03-02 09:44:33 sasl2 authenticator failed for (xxxx) [127.0.0.1]: 535 Incorrect authentication data (set_id=ph10) -- 2.30.2