summaryrefslogtreecommitdiffstats
path: root/src/smtpd/smtpd_sasl_glue.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 00:00:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 00:00:39 +0000
commit1e7741f40999b12a66f37978b280c7fa55b4fa0b (patch)
treee4567cce7db513c446c3f774631a86b776c957eb /src/smtpd/smtpd_sasl_glue.c
parentAdding upstream version 3.5.24. (diff)
downloadpostfix-1e7741f40999b12a66f37978b280c7fa55b4fa0b.tar.xz
postfix-1e7741f40999b12a66f37978b280c7fa55b4fa0b.zip
Adding upstream version 3.5.25.upstream/3.5.25upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/smtpd/smtpd_sasl_glue.c')
-rw-r--r--src/smtpd/smtpd_sasl_glue.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/smtpd/smtpd_sasl_glue.c b/src/smtpd/smtpd_sasl_glue.c
index ee5c041..2c24edc 100644
--- a/src/smtpd/smtpd_sasl_glue.c
+++ b/src/smtpd/smtpd_sasl_glue.c
@@ -321,18 +321,20 @@ int smtpd_sasl_authenticate(SMTPD_STATE *state,
}
}
if (status != XSASL_AUTH_DONE) {
+ const char *reason = (*STR(state->sasl_reply) ? STR(state->sasl_reply) :
+ "(reason unavailable)");
+
sasl_username = xsasl_server_get_username(state->sasl_server);
msg_warn("%s: SASL %.100s authentication failed: %s, sasl_username=%.100s",
- state->namaddr, sasl_method, *STR(state->sasl_reply) ?
- STR(state->sasl_reply) : "(reason unavailable)",
+ state->namaddr, sasl_method, reason,
sasl_username ? sasl_username : "(unavailable)");
/* RFC 4954 Section 6. */
if (status == XSASL_AUTH_TEMP)
smtpd_chat_reply(state, "454 4.7.0 Temporary authentication failure: %s",
- STR(state->sasl_reply));
+ reason);
else
smtpd_chat_reply(state, "535 5.7.8 Error: authentication failed: %s",
- STR(state->sasl_reply));
+ reason);
return (-1);
}
/* RFC 4954 Section 6. */