From 124640f177c118b096ed2c531a4617d52a283395 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 14 Mar 2011 03:28:00 +0100 Subject: [PATCH] nspawn: reset umask if needed --- src/nspawn.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nspawn.c b/src/nspawn.c index bf4e6de2..82b0ce4f 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; } -- 2.39.5