summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjacekm <jacekm@openbsd.org>2010-04-22 12:56:33 +0000
committerjacekm <jacekm@openbsd.org>2010-04-22 12:56:33 +0000
commit388db3adf22cfacda31c2066fbcb6ff2a9b2f070 (patch)
treec086511a147c941441b7721c429a02a05c213709
parentuse BUS_DMA_ZERO on alloc instead of bzeroing after. (diff)
downloadwireguard-openbsd-388db3adf22cfacda31c2066fbcb6ff2a9b2f070.tar.xz
wireguard-openbsd-388db3adf22cfacda31c2066fbcb6ff2a9b2f070.zip
Fix a case of runner trying to send imsg directly to smtp process instead
of forwarding it via queue.
-rw-r--r--usr.sbin/smtpd/bounce.c9
-rw-r--r--usr.sbin/smtpd/runner.c6
-rw-r--r--usr.sbin/smtpd/smtpd.h3
3 files changed, 6 insertions, 12 deletions
diff --git a/usr.sbin/smtpd/bounce.c b/usr.sbin/smtpd/bounce.c
index 7974c661282..76a7f5d7efa 100644
--- a/usr.sbin/smtpd/bounce.c
+++ b/usr.sbin/smtpd/bounce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bounce.c,v 1.17 2009/12/23 17:16:03 jacekm Exp $ */
+/* $OpenBSD: bounce.c,v 1.18 2010/04/22 12:56:33 jacekm Exp $ */
/*
* Copyright (c) 2009 Gilles Chehade <gilles@openbsd.org>
@@ -45,13 +45,6 @@ struct client_ctx {
void bounce_event(int, short, void *);
-void
-bounce_process(struct smtpd *env, struct message *message)
-{
- imsg_compose_event(env->sc_ievs[PROC_SMTP], IMSG_SMTP_ENQUEUE, 0, 0, -1,
- message, sizeof(*message));
-}
-
int
bounce_session(struct smtpd *env, int fd, struct message *messagep)
{
diff --git a/usr.sbin/smtpd/runner.c b/usr.sbin/smtpd/runner.c
index f2b051db201..7dcf6427484 100644
--- a/usr.sbin/smtpd/runner.c
+++ b/usr.sbin/smtpd/runner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: runner.c,v 1.85 2010/04/22 12:13:33 jacekm Exp $ */
+/* $OpenBSD: runner.c,v 1.86 2010/04/22 12:56:33 jacekm Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -454,7 +454,9 @@ runner_process_batchqueue(struct smtpd *env)
switch (batchp->type) {
case T_BOUNCE_BATCH:
while ((m = TAILQ_FIRST(&batchp->messages))) {
- bounce_process(env, m);
+ imsg_compose_event(env->sc_ievs[PROC_QUEUE],
+ IMSG_SMTP_ENQUEUE, PROC_SMTP, 0, -1, m,
+ sizeof *m);
TAILQ_REMOVE(&batchp->messages, m, entry);
free(m);
}
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index eba74f986a1..3bced957a50 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.179 2010/04/21 21:47:39 gilles Exp $ */
+/* $OpenBSD: smtpd.h,v 1.180 2010/04/22 12:56:33 jacekm Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -855,7 +855,6 @@ void alias_to_expand_node(struct expand_node *, struct alias *);
int authenticate_user(char *, char *);
/* bounce.c */
-void bounce_process(struct smtpd *, struct message *);
int bounce_session(struct smtpd *, int, struct message *);
int bounce_session_switch(struct smtpd *, FILE *, enum session_state *, char *,
struct message *);