diff options
author | Dimitri Staessens <[email protected]> | 2021-06-28 21:05:17 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2021-06-29 08:55:56 +0200 |
commit | 16675c72764c59644c1822bf481482fcbd6e850c (patch) | |
tree | e496bcccd96b8e45e57a739357f9965c9d016cf6 /src | |
parent | 9d2688340bea357e2c2206f3c69ea64c866cb2ad (diff) | |
download | ouroboros-16675c72764c59644c1822bf481482fcbd6e850c.tar.gz ouroboros-16675c72764c59644c1822bf481482fcbd6e850c.zip |
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 <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/irmd/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 |