summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2020-02-01 12:54:39 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2020-02-01 12:54:39 +0000
commit9b8446dfdd6ddad164499fd245054e0b7f46ff85 (patch)
treea6b9c591296b6e5186f108c3b70a86bf2204c1f7 /usr.sbin
parentbfae1558cdd82ad057b426a1a324927e588ee051 (diff)
condition to enter mda_mbox() is too strict, if user have commands in their
forward file they're not supposed to enter that code path.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/smtpd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c
index 98b734222db..5341b6c6649 100644
--- a/usr.sbin/smtpd/smtpd.c
+++ b/usr.sbin/smtpd/smtpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.c,v 1.329 2020/01/31 22:01:20 gilles Exp $ */
+/* $OpenBSD: smtpd.c,v 1.330 2020/02/01 12:54:38 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -1534,7 +1534,9 @@ forkmda(struct mproc *p, uint64_t id, struct deliver *deliver)
/* avoid hangs by setting 5m timeout */
alarm(300);
- if (dsp->u.local.is_mbox && dsp->u.local.mda_wrapper == NULL)
+ if (dsp->u.local.is_mbox &&
+ dsp->u.local.mda_wrapper == NULL &&
+ deliver->mda_exec[0] == '\0')
mda_mbox(deliver);
else
mda_unpriv(dsp, deliver, pw_name, pw_dir);