lxc_monitord_spawn() in src/lxc/monitor.c contained "umask(0);", and
because of this, lxc-monitord created lxc-monitord.log with mode 0666.
World-writeable log files are bad, so remove this umask(0).

Signed-off-by: Robert Vogelgesang <[email protected]>

diff -u lxc-lxc-1.0.0.beta3/src/lxc/monitor.c.orig 
lxc-lxc-1.0.0.beta3/src/lxc/monitor.c
--- lxc-lxc-1.0.0.beta3/src/lxc/monitor.c.orig  2014-01-27 14:52:20.000000000 
+0100
+++ lxc-lxc-1.0.0.beta3/src/lxc/monitor.c       2014-01-28 11:57:26.692102355 
+0100
@@ -325,7 +325,6 @@
                exit(EXIT_SUCCESS);
        }
 
-       umask(0);
        if (setsid() < 0) {
                SYSERROR("failed to setsid");
                exit(EXIT_FAILURE);
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to