From 16675c72764c59644c1822bf481482fcbd6e850c Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 28 Jun 2021 21:05:17 +0200 Subject: irmd: Fix setting mode on RIB directory The irmd was creating the directory with the wrong mode set because the default mask (022) was not cleared. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/irmd/main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/irmd/main.c b/src/irmd/main.c index 471e9c36..8ca0a1d6 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -2292,6 +2292,7 @@ static int irm_init(void) { struct stat st; pthread_condattr_t cattr; + mode_t mask; memset(&st, 0, sizeof(st)); @@ -2393,10 +2394,14 @@ static int irm_init(void) goto fail_rdrbuff; } #ifdef HAVE_FUSE + mask = umask(0); + if (stat(FUSE_PREFIX, &st) != -1) log_warn(FUSE_PREFIX " already exists..."); else mkdir(FUSE_PREFIX, 0777); + + umask(mask); #endif #ifdef HAVE_LIBGCRYPT -- cgit v1.2.3