From 22ba4a848359040b64647908ab8e732209645df5 Mon Sep 17 00:00:00 2001 From: roker Date: Wed, 10 Apr 2024 11:42:44 +0200 Subject: [PATCH] umask(77) -> umask(077): "allow rwx permission for the owner, but prohibit rwx for everyone else" --- treefiles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/treefiles.c b/treefiles.c index 4af6d118..a5552226 100644 --- a/treefiles.c +++ b/treefiles.c @@ -84,7 +84,7 @@ int open_treefile(char* name, mode_t mode, off_t size, off_t pos, pthread_mutex_ DEBUG("Creating a dummy tempfile for reading"); char tmpname[] = "dummy-XXXXXX"; - mode_t oldmode = umask(77); + mode_t oldmode = umask(077); handle = mkstemp(tmpname); umask(oldmode); if (handle>0) {