Module: check_mk
Branch: master
Commit: 7c63284af63ace69df349e4db90eeccc0409ee35
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7c63284af63aceā¦
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Sep 24 09:47:19 2018 +0200
6711 SEC Change Check_MK site umask to prevent "world" access
To prevent Check_MK site files from being read by any local system user the Check_MK
sites now have a umask of 0007 set.
The effect of this change is that new files and directories that are created in
the context of the site user are not accessible by "world" users. These are
local system users that are neither the site user nor members of the site
group.
If you don't like this, you can change the umask back to e.g. 0002 in the file
<tt>~/.profile</tt>.
Change-Id: I9a4a88b3de4937f2fa1fbaa18564930ee08e598a
---
.werks/6711 | 19 +++++++++++++++++++
omd/packages/omd/skel/.profile | 3 +++
2 files changed, 22 insertions(+)
diff --git a/.werks/6711 b/.werks/6711
new file mode 100644
index 0000000..5cbf180
--- /dev/null
+++ b/.werks/6711
@@ -0,0 +1,19 @@
+Title: Change Check_MK site umask to prevent "world" access
+Level: 1
+Component: omd
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1537775010
+Class: security
+
+To prevent Check_MK site files from being read by any local system user the Check_MK
+sites now have a umask of 0007 set.
+
+The effect of this change is that new files and directories that are created in
+the context of the site user are not accessible by "world" users. These are
+local system users that are neither the site user nor members of the site
+group.
+
+If you don't like this, you can change the umask back to e.g. 0002 in the file
+<tt>~/.profile</tt>.
diff --git a/omd/packages/omd/skel/.profile b/omd/packages/omd/skel/.profile
index 86d8a2c..18204c1 100644
--- a/omd/packages/omd/skel/.profile
+++ b/omd/packages/omd/skel/.profile
@@ -5,6 +5,9 @@ export OMD_ROOT=###ROOT###
PATH=$OMD_ROOT/local/bin:$OMD_ROOT/bin:$OMD_ROOT/local/lib/perl5/bin:$PATH
export LD_LIBRARY_PATH=$OMD_ROOT/local/lib:$OMD_ROOT/lib
+# Create files and directories not accessible for "world" by default
+umask 0007
+
# enable local perl env
export
PERL5LIB="$OMD_ROOT/local/lib/perl5/lib/perl5:$OMD_ROOT/lib/perl5/lib/perl5:$PERL5LIB"
export PATH="$OMD_ROOT/lib/perl5/bin:$PATH"