[PATCH stalld 35/52] stalld: fix inverted DAEMON_UMASK value

Wander Lairson Costa <[email protected]> Mon, 8 Jun 2026 15:31:45 -0300
Newsgroups org.kernel.vger.linux-rt-users
Message-ID <[email protected]>
DAEMON_UMASK is defined as 0644, which is a file permission mode rather
than a proper umask value. Since umask() clears the specified bits,
umask(0644) strips owner read and write permissions while leaving files
world-writable. Change the value to 0022 so that newly created files
get the intended restrictive permissions.

Signed-off-by: Wander Lairson Costa <[email protected]>
---
 src/stalld.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/stalld.h b/src/stalld.h
index 69bc9e7..b910870 100644
--- a/src/stalld.h
+++ b/src/stalld.h
@@ -46,7 +46,7 @@
 /*
  * Daemon umask value.
  */
-#define DAEMON_UMASK  0644
+#define DAEMON_UMASK  0022
 
 /*
  * Informnation about running tasks on a CPU.
-- 
2.54.0