summaryrefslogtreecommitdiff
path: root/src/nspawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nspawn.c')
-rw-r--r--src/nspawn.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nspawn.c b/src/nspawn.c
index bf4e6de2ab..82b0ce4f13 100644
--- a/src/nspawn.c
+++ b/src/nspawn.c
@@ -176,6 +176,9 @@ static int copy_devnodes(const char *dest) {
int r = 0, k;
char *tty = NULL;
dev_t tty_devnum;
+ mode_t u;
+
+ u = umask(0000);
NULSTR_FOREACH(d, devnodes) {
char *from = NULL, *to = NULL;
@@ -265,6 +268,8 @@ static int copy_devnodes(const char *dest) {
free(tty);
+ umask(u);
+
return r;
}