[lxc-devel] [PATCH] lxc-monitord.log should not be created with mode 0666

Robert Vogelgesang vogel at users.sourceforge.net
Tue Jan 28 11:01:54 UTC 2014


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 <vogel at users.sourceforge.net>

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);


More information about the lxc-devel mailing list