diff options
author | gilles <gilles@openbsd.org> | 2020-02-01 12:54:38 +0000 |
---|---|---|
committer | gilles <gilles@openbsd.org> | 2020-02-01 12:54:38 +0000 |
commit | fc7f88cf208e67b54f2210cca649e2ae05c2a4f1 (patch) | |
tree | 7c7c79dda8e028608815104e6a4946d29c517c01 | |
parent | introduce mda_mbox() to handle mbox delivery in its own code path, and make (diff) | |
download | OpenSMTPD-fc7f88cf208e67b54f2210cca649e2ae05c2a4f1.tar.xz OpenSMTPD-fc7f88cf208e67b54f2210cca649e2ae05c2a4f1.zip |
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.
-rw-r--r-- | smtpd.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |