]> git.ipfire.org Git - people/ms/dma.git/commitdiff
writequeuef: create files with g+rw
authorSimon Schubert <2@0x2c.org>
Sun, 31 Oct 2010 15:54:42 +0000 (16:54 +0100)
committerSimon Schubert <2@0x2c.org>
Sun, 31 Oct 2010 17:33:16 +0000 (18:33 +0100)
spool.c

diff --git a/spool.c b/spool.c
index 2208159845a9820e08a65dfff3a79aac1d5112aa..25c6a99d2cee98929a2f50f81803cc24a703900e 100644 (file)
--- a/spool.c
+++ b/spool.c
@@ -123,9 +123,11 @@ writequeuef(struct qitem *it)
        int error;
        int queuefd;
 
-       queuefd = open_locked(it->queuefn, O_CREAT|O_EXCL|O_RDWR, 0600);
+       queuefd = open_locked(it->queuefn, O_CREAT|O_EXCL|O_RDWR, 0660);
        if (queuefd == -1)
                return (-1);
+       if (fchmod(queuefd, 0660) < 0)
+               return (-1);
        it->queuef = fdopen(queuefd, "w+");
        if (it->queuef == NULL)
                return (-1);