diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2012-01-31 21:05:27 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2012-01-31 21:05:27 +0000 |
commit | 12d6d9d82e859ee400b24f95b40edbf125eaa0b7 (patch) | |
tree | 8900870a6e20aaa626ee351719fa0c5b52bac681 /usr.sbin/smtpd/queue_fsqueue.c | |
parent | 9bd9e77d82b6e87c8ba8e349845b318b62dfb859 (diff) |
fix an issue observed this week-end while flooding ajacoutot@ :
we keep track of available fd's to prevent scheduling of messages if we
know that we are going to fail. however, since the envelope is not
removed from the scheduler, it will be rescheduled right away leading to
a busy loop in the scheduler. we know flag the mda/mta processes as BUSY
and do not schedule envelopes that target a BUSY process.
also, fix a potential bug that could lead to a use after free when doing
a batch/message/host traversal of schedulable envelopes.
while at it fix misuse of env->sc_opts as env->sc_flags, was not really
causing any issue as the misuse was constant ...
Diffstat (limited to 'usr.sbin/smtpd/queue_fsqueue.c')
-rw-r--r-- | usr.sbin/smtpd/queue_fsqueue.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/queue_fsqueue.c b/usr.sbin/smtpd/queue_fsqueue.c index d7312ecae6d..f428965f4db 100644 --- a/usr.sbin/smtpd/queue_fsqueue.c +++ b/usr.sbin/smtpd/queue_fsqueue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: queue_fsqueue.c,v 1.37 2012/01/29 16:54:13 eric Exp $ */ +/* $OpenBSD: queue_fsqueue.c,v 1.38 2012/01/31 21:05:26 gilles Exp $ */ /* * Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org> @@ -243,6 +243,8 @@ fsqueue_envelope_delete(enum queue_kind qkind, struct envelope *ep) { char pathname[MAXPATHLEN]; + log_debug("#### %s: queue_envelope_delete: %016" PRIx64, + __func__, ep->id); fsqueue_envelope_path(qkind, ep->id, pathname, sizeof(pathname)); if (unlink(pathname) == -1) { |