hello,

forkmda() is never supposed to be called with an action dispatcher which
is not local, this would indicate that the code path was abused somehow.

idea suggested by Demi M. Obenour


diff --git a/smtpd/smtpd.c b/smtpd/smtpd.c
index ce1262fa..4c5fc3d9 100644
--- a/smtpd/smtpd.c
+++ b/smtpd/smtpd.c
@@ -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,


-- 
Gilles Chehade                                                 @poolpOrg

https://www.poolp.org            patreon: https://www.patreon.com/gilles

Reply via email to