]> Git Repo - linux.git/commitdiff
tmon: set umask to a reasonable value
authorNeil Horman <[email protected]>
Tue, 17 Jun 2014 20:05:09 +0000 (16:05 -0400)
committerZhang Rui <[email protected]>
Tue, 1 Jul 2014 14:00:51 +0000 (22:00 +0800)
Currently, the tmon umask value is set to 0, which means whatever the permission
mask in the shell are when starting tmon in daemon mode are what the permissions
of any created files will be.  We should likely set something more explicit, so
lets go with the usual 022

Signed-off-by: Neil Horman <[email protected]>
Acked-by: Jacob Pan <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
tools/thermal/tmon/tmon.c

index 059e0becb3866ee5304a553b2b57eaf49b392c6b..09b7c3218334ba29dad1192d5dbd5a963dd51553 100644 (file)
@@ -355,7 +355,7 @@ static void start_daemon_mode()
        disable_tui();
 
        /* change the file mode mask */
-       umask(0);
+       umask(S_IWGRP | S_IWOTH);
 
        /* new SID for the daemon process */
        sid = setsid();
This page took 0.051117 seconds and 4 git commands to generate.