Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Neil Horman and committed by
Zhang Rui
4adccf9f 951fda3d

+1 -1
+1 -1
tools/thermal/tmon/tmon.c
··· 355 355 disable_tui(); 356 356 357 357 /* change the file mode mask */ 358 - umask(0); 358 + umask(S_IWGRP | S_IWOTH); 359 359 360 360 /* new SID for the daemon process */ 361 361 sid = setsid();