]> git.tuebingen.mpg.de Git - dss.git/commitdiff
daemon_init(): Do not set umask to zero.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 25 Oct 2019 11:34:49 +0000 (13:34 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 25 Oct 2019 11:34:49 +0000 (13:34 +0200)
We don't need this because we actively want rsync to respect the file
creation mask. This does not matter in the common case of a single
source directory because the permission bits will be copied from the
source directory anyway. However, for multiple source directories it
does matter because with umask(0) the top level snapshot directory
is created with mode 777.

daemon.c

index 709785b437041654e3cacd2fd4f252aea8fa4173..ad73061c14ec5916284f2ab67438306d6484827d 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -60,7 +60,6 @@ int daemon_init(void)
        /* become session leader */
        if (setsid() < 0)
                goto err;
-       umask(0);
        null = open("/dev/null", O_RDWR);
        if (null < 0)
                goto err;