From 7dbe83855f6211f2a8dd55aeb39187912cb2ef8f Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Sun, 20 Sep 2009 20:56:32 +0200 Subject: [PATCH] dma: create spool files mode 660 dma runs setgid mail, so we need to create files which are group readable, otherwise we won't be able to read them later. --- libexec/dma/spool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libexec/dma/spool.c b/libexec/dma/spool.c index 69f29f3109..23f6e420e0 100644 --- a/libexec/dma/spool.c +++ b/libexec/dma/spool.c @@ -78,6 +78,9 @@ newspoolf(struct queue *queue) fd = mkstemp(fn); if (fd < 0) return (-1); + /* XXX group rights */ + if (fchmod(fd, 0660) < 0) + goto fail; if (flock(fd, LOCK_EX) == -1) goto fail; queue->tmpf = strdup(fn); -- 2.41.0