]> err.no Git - systemd/commitdiff
nspawn: reset umask if needed
authorLennart Poettering <lennart@poettering.net>
Mon, 14 Mar 2011 02:28:00 +0000 (03:28 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 14 Mar 2011 02:28:00 +0000 (03:28 +0100)
src/nspawn.c

index bf4e6de2ab1d6ffc73206bbd730e3626cb825914..82b0ce4f133bb318d49337bf1cba4208c0b45cb0 100644 (file)
@@ -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;
 }