summaryrefslogtreecommitdiffstats
path: root/tools/thermal/tmon
diff options
context:
space:
mode:
authorNeil Horman <nhorman@tuxdriver.com>2014-06-17 16:05:09 -0400
committerZhang Rui <rui.zhang@intel.com>2014-07-01 10:00:51 -0400
commit4adccf9fc84aaf5e4d18442e163d549e0b603075 (patch)
tree8b7b8eb1d6a8f88fc4b44573b824791dd5dcfd4f /tools/thermal/tmon
parent951fda3d8c644597a1d5cdae14cab31567e754a1 (diff)
tmon: set umask to a reasonable value
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 <nhorman@tuxdriver.com> Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'tools/thermal/tmon')
-rw-r--r--tools/thermal/tmon/tmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/thermal/tmon/tmon.c b/tools/thermal/tmon/tmon.c
index 059e0becb386..09b7c3218334 100644
--- a/tools/thermal/tmon/tmon.c
+++ b/tools/thermal/tmon/tmon.c
@@ -355,7 +355,7 @@ static void start_daemon_mode()
355 disable_tui(); 355 disable_tui();
356 356
357 /* change the file mode mask */ 357 /* change the file mode mask */
358 umask(0); 358 umask(S_IWGRP | S_IWOTH);
359 359
360 /* new SID for the daemon process */ 360 /* new SID for the daemon process */
361 sid = setsid(); 361 sid = setsid();