]> git.ipfire.org Git - people/ms/dma.git/blobdiff - spool.c
Makefile: put libraries at the end when linking
[people/ms/dma.git] / 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);