From: Andre Noll Date: Fri, 25 Oct 2019 11:34:49 +0000 (+0200) Subject: daemon_init(): Do not set umask to zero. X-Git-Tag: v1.0.1~3 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=0f8170444cf9e2bcc42b64bdcae3a38b7ac55e66;p=dss.git daemon_init(): Do not set umask to zero. 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. --- diff --git a/daemon.c b/daemon.c index 709785b..ad73061 100644 --- 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;