> On 4. May 2020, at 11:17, Gilles Chehade <gil...@poolp.org> wrote:
> 
> 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


ok jung@ (for post-lock)

> 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,

Reply via email to