summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-14 03:28:00 +0100
committerLennart Poettering <lennart@poettering.net>2011-03-14 03:28:00 +0100
commit124640f177c118b096ed2c531a4617d52a283395 (patch)
tree9672525b66ed8f7e2665560c96cf1ac0f1d175e7 /src
parent94d8298589f06de596fbc0a4bc9b50072a2a0536 (diff)
nspawn: reset umask if needed
Diffstat (limited to 'src')
-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;
}