]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-monitord.log should not be created with mode 0666
authorRobert Vogelgesang <vogel@users.sourceforge.net>
Tue, 28 Jan 2014 11:01:54 +0000 (12:01 +0100)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 29 Jan 2014 11:43:03 +0000 (11:43 +0000)
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@users.sourceforge.net>
Acked-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/monitor.c

index 87925dc741c7a36e3df16a0f4d9f1e699e08fbc0..5e21dc5ac36fcd167978b832e190d4f6e578e31b 100644 (file)
@@ -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);