lkml.org 
[lkml]   [2014]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] tmon: set umask to a reasonable value
On Tue, 17 Jun 2014 16:05:09 -0400
Neil Horman <nhorman@tuxdriver.com> wrote:

> current, the tmon umask value is set to 0, which mean whatever the
Currently, ..., which means ...
> 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
>
Just some grammar suggestion. Otherwise,
Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>

> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: Zhang Rui <rui.zhang@intel.com>
> CC: Jacob Pan <jacob.jun.pan@linux.intel.com>
> ---
> tools/thermal/tmon/tmon.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/thermal/tmon/tmon.c b/tools/thermal/tmon/tmon.c
> index 059e0be..09b7c32 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();

[Jacob Pan]

--
Thanks,

Jacob


\
 
 \ /
  Last update: 2014-06-18 00:01    [W:0.081 / U:1.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site