Skip to content

Commit

Permalink
tmon: set umask to a reasonable value
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Jacob Pan <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
  • Loading branch information
nhorman authored and zhang-rui committed Jul 1, 2014
1 parent 951fda3 commit 4adccf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/thermal/tmon/tmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4adccf9

Please sign in to comment.