From: Lennart Poettering Date: Mon, 14 Mar 2011 02:28:00 +0000 (+0100) Subject: nspawn: reset umask if needed X-Git-Tag: v21~102 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=124640f177c118b096ed2c531a4617d52a283395;p=systemd nspawn: reset umask if needed --- 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; }