From 0f8170444cf9e2bcc42b64bdcae3a38b7ac55e66 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 25 Oct 2019 13:34:49 +0200 Subject: [PATCH] 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. --- daemon.c | 1 - 1 file changed, 1 deletion(-) 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; -- 2.39.5