From: Neil Horman Date: Tue, 17 Jun 2014 20:05:09 +0000 (-0400) Subject: tmon: set umask to a reasonable value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4adccf9fc84aaf5e4d18442e163d549e0b603075;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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();