From: Neil Horman <nhorman@tuxdriver.com>
To: linux-kernel@vger.kernel.org
Cc: Zhang Rui <rui.zhang@intel.com>,
Jacob Pan <jacob.jun.pan@linux.intel.com>,
Neil Horman <nhorman@tuxdriver.com>
Subject: [PATCH 2/2] tmon: set umask to a reasonable value
Date: Tue, 17 Jun 2014 16:05:09 -0400 [thread overview]
Message-ID: <1403035509-31815-3-git-send-email-nhorman@tuxdriver.com> (raw)
In-Reply-To: <1403035509-31815-1-git-send-email-nhorman@tuxdriver.com>
current, the tmon umask value is set to 0, which mean 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>
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();
--
1.8.3.1
next prev parent reply other threads:[~2014-06-17 20:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-17 20:05 PATCH 0/2 tmon: fix a few minor security issues Neil Horman
2014-06-17 20:05 ` [PATCH 1/2] tmon: Check log file for common secuirty issues Neil Horman
2014-06-17 21:13 ` Jacob Pan
2014-06-17 20:05 ` Neil Horman [this message]
2014-06-17 21:14 ` [PATCH 2/2] tmon: set umask to a reasonable value Jacob Pan
2014-06-17 21:15 ` PATCH 0/2 tmon: fix a few minor security issues Jacob Pan
2014-07-01 11:42 ` Neil Horman
2014-07-01 13:49 ` Zhang Rui
2014-07-01 15:02 ` Neil Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403035509-31815-3-git-send-email-nhorman@tuxdriver.com \
--to=nhorman@tuxdriver.com \
--cc=jacob.jun.pan@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®