dma: don't set it->mailf too early
authorSimon Schubert <corecode@dragonflybsd.org>
Tue, 25 Aug 2009 00:22:04 +0000 (02:22 +0200)
committerSimon Schubert <corecode@dragonflybsd.org>
Tue, 25 Aug 2009 00:24:39 +0000 (02:24 +0200)
We may not set it->mailf in newspoolf(), or aquirespool() will not
(re-)open the mail file, leading to concurrent seeks.

Reported-by: Daniel Roethlisberger
DragonFly-Bug: <http://bugs.dragonflybsd.org/issue1462>

libexec/dma/spool.c

index 9a74620..33e972d 100644 (file)
@@ -101,7 +101,6 @@ newspoolf(struct queue *queue, const char *sender)
        hdrlen = ftello(queue->mailf);
 
        LIST_FOREACH(it, &queue->queue, next) {
-               it->mailf = queue->mailf;
                it->hdrlen = hdrlen;
        }