summaryrefslogtreecommitdiff
path: root/src/namespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/namespace.c')
-rw-r--r--src/namespace.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/namespace.c b/src/namespace.c
index a06cac10fd..09bc82909f 100644
--- a/src/namespace.c
+++ b/src/namespace.c
@@ -253,11 +253,19 @@ int setup_namespace(
}
if (need_private) {
+ mode_t u;
+
memcpy(private_dir, tmp_dir, sizeof(tmp_dir)-1);
+
+ u = umask(0000);
if (mkdir(private_dir, 0777 + S_ISVTX) < 0) {
+ umask(u);
+
r = -errno;
goto fail;
}
+
+ umask(u);
remove_private = true;
}