diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2020-05-06 16:03:31 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2020-05-06 16:03:31 +0000 |
commit | 659b81bde64be4064aa8673e5e2082e4199f5592 (patch) | |
tree | b662767135bead9b96bd465d94732183c6958f48 /usr.sbin | |
parent | f49f89e4f2ed863c07df8ee2aed39bf400ea68ab (diff) |
Only allow forkmda() to be called from a local action dispatcher.
From gilles@, OK deraadt@ jung@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/smtpd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c index ce1262fa4fc..d0c67bab2af 100644 --- a/usr.sbin/smtpd/smtpd.c +++ b/usr.sbin/smtpd/smtpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.c,v 1.332 2020/02/24 16:16:08 millert Exp $ */ +/* $OpenBSD: smtpd.c,v 1.333 2020/05/06 16:03:30 millert Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -1409,6 +1409,8 @@ forkmda(struct mproc *p, uint64_t id, struct deliver *deliver) const char *pw_dir; dsp = dict_xget(env->sc_dispatchers, deliver->dispatcher); + if (dsp->type != DISPATCHER_LOCAL) + fatalx("non-local dispatcher called from forkmda()"); log_debug("debug: smtpd: forking mda for session %016"PRIx64 ": %s as %s", id, deliver->userinfo.username, |