summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2019-07-10 19:53:53 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2019-07-10 19:53:53 +0000
commitc8c0431c50fca35f7830293ec7fd7ea3c8d98555 (patch)
tree921368b131964ba692dc980f7f7ae5aa493f191f
parenta5f21dbde20d1b97853591519c5037f8c79029f8 (diff)
obfuscate auth parameters in smtp reporting
-rw-r--r--usr.sbin/smtpd/smtp_session.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c
index 429fc5b610e..55010df34d3 100644
--- a/usr.sbin/smtpd/smtp_session.c
+++ b/usr.sbin/smtpd/smtp_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp_session.c,v 1.395 2019/07/03 03:24:03 deraadt Exp $ */
+/* $OpenBSD: smtp_session.c,v 1.396 2019/07/10 19:53:52 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -1200,20 +1200,23 @@ smtp_command(struct smtp_session *s, char *line)
int cmd, i;
log_trace(TRACE_SMTP, "smtp: %p: <<< %s", s, line);
- report_smtp_protocol_client("smtp-in", s->id, line);
/*
* These states are special.
*/
if (s->state == STATE_AUTH_INIT) {
+ report_smtp_protocol_client("smtp-in", s->id, "AUTH PLAIN ********");
smtp_rfc4954_auth_plain(s, line);
return;
}
if (s->state == STATE_AUTH_USERNAME || s->state == STATE_AUTH_PASSWORD) {
+ report_smtp_protocol_client("smtp-in", s->id, "********");
smtp_rfc4954_auth_login(s, line);
return;
}
+ report_smtp_protocol_client("smtp-in", s->id, line);
+
/*
* Unlike other commands, "mail from" and "rcpt to" contain a
* space in the command name.