From: Robert Vogelgesang Date: Tue, 28 Jan 2014 11:01:54 +0000 (+0100) Subject: lxc-monitord.log should not be created with mode 0666 X-Git-Tag: lxc-1.0.0.beta4~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a27ed52b34b179ed91bdf3db1625d242e2c4eeac;p=thirdparty%2Flxc.git lxc-monitord.log should not be created with mode 0666 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 Acked-by: Dwight Engen Acked-by: Stéphane Graber --- diff --git a/src/lxc/monitor.c b/src/lxc/monitor.c index 87925dc74..5e21dc5ac 100644 --- a/src/lxc/monitor.c +++ b/src/lxc/monitor.c @@ -325,7 +325,6 @@ int lxc_monitord_spawn(const char *lxcpath) exit(EXIT_SUCCESS); } - umask(0); if (setsid() < 0) { SYSERROR("failed to setsid"); exit(EXIT_FAILURE);