From: Neil Horman Date: Tue, 17 Jun 2014 20:05:09 +0000 (-0400) Subject: tmon: set umask to a reasonable value X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~14191^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=4adccf9fc84aaf5e4d18442e163d549e0b603075;p=mirror_ubuntu-focal-kernel.git 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 Acked-by: Jacob Pan Signed-off-by: Zhang Rui --- 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() disable_tui(); /* change the file mode mask */ - umask(0); + umask(S_IWGRP | S_IWOTH); /* new SID for the daemon process */ sid = setsid();