Module: check_mk
Branch: master
Commit: f15226dfdad483003f29f80962a450e22cc4187c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f15226dfdad483…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Tue Oct 9 16:20:39 2018 +0200
6412 FIX mk_docker_container_piggybacked: don't try to execute the check_mk_agent inside a container if no bash is available
If bash is not available in a docker container docker reports the error on stdout.
The mk_docker_container_piggybacked plugin misinterpreted the error as an
available check_mk_agent inside of the container.
Affected hosts using the mk_docker_container_piggybacked plugin have to update
the plugin to the new version to avoid this behaviour.
Change-Id: If851fe33dea6cb861feb9bf416416e0ac802568d
---
.werks/6412 | 16 ++++++++++++++++
agents/plugins/mk_docker_container_piggybacked | 2 +-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/6412 b/.werks/6412
new file mode 100644
index 0000000..464e282
--- /dev/null
+++ b/.werks/6412
@@ -0,0 +1,16 @@
+Title: mk_docker_container_piggybacked: don't try to execute the check_mk_agent inside a container if no bash is available
+Level: 1
+Component: checks
+Class: fix
+Compatible: incomp
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1539094056
+
+If bash is not available in a docker container docker reports the error on stdout.
+The mk_docker_container_piggybacked plugin misinterpreted the error as an
+available check_mk_agent inside of the container.
+
+Affected hosts using the mk_docker_container_piggybacked plugin have to update
+the plugin to the new version to avoid this behaviour.
diff --git a/agents/plugins/mk_docker_container_piggybacked b/agents/plugins/mk_docker_container_piggybacked
index 5d8ca3e..36cf98c 100755
--- a/agents/plugins/mk_docker_container_piggybacked
+++ b/agents/plugins/mk_docker_container_piggybacked
@@ -42,7 +42,7 @@ if type docker > /dev/null 2>&1; then
# the container.
# Once it comes to plugins and custom configuration the user needs to use
# a little more complex setup. Have a look at the documentation.
- AGENT_PATH=$(docker container exec "$CONTAINER_ID" bash -c "type check_mk_agent" 2>/dev/null)
+ AGENT_PATH=$(docker container exec "$CONTAINER_ID" bash -c "type check_mk_agent" 2>/dev/null) || AGENT_PATH=
if [ -n "$AGENT_PATH" ]; then
docker container exec --env "REMOTE=$REMOTE" "$CONTAINER_ID" check_mk_agent
elif docker container exec "$CONTAINER_ID" which bash >/dev/null 2>&1; then
Module: check_mk
Branch: master
Commit: 042edf72b897367a4f20f6556d97272f4996aa1d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=042edf72b89736…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 1 19:40:56 2018 +0200
Improved start_url input validation
Change-Id: I5a595ba5efd9cf4bbef19cf35ef9158a140323c4
---
cmk/gui/plugins/userdb/user_attributes.py | 9 +++++++--
cmk/gui/plugins/wato/check_mk_configuration.py | 15 +++++++++------
cmk/gui/utils.py | 7 +++++++
cmk/gui/watolib.py | 1 -
4 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/cmk/gui/plugins/userdb/user_attributes.py b/cmk/gui/plugins/userdb/user_attributes.py
index 426ba21..35d457b 100644
--- a/cmk/gui/plugins/userdb/user_attributes.py
+++ b/cmk/gui/plugins/userdb/user_attributes.py
@@ -28,7 +28,10 @@ from cmk.gui.config import theme_choices
from cmk.gui.valuespec import *
from cmk.gui.i18n import _
from cmk.gui.globals import html
-from . import UserAttribute, user_attribute_registry
+from cmk.gui.plugins.userdb import (
+ UserAttribute,
+ user_attribute_registry,
+)
@user_attribute_registry.register
class ForceAuthUserUserAttribute(UserAttribute):
@@ -160,7 +163,9 @@ class StartURLUserAttribute(UserAttribute):
"URL you like here."),
size = 80,
default_value = "dashboard.py",
- attrencode = True
+ attrencode = True,
+ allow_empty = False,
+ validate = utils.validate_start_url,
),
],
),
diff --git a/cmk/gui/plugins/wato/check_mk_configuration.py b/cmk/gui/plugins/wato/check_mk_configuration.py
index 3bb1c1d..2ada3c8 100644
--- a/cmk/gui/plugins/wato/check_mk_configuration.py
+++ b/cmk/gui/plugins/wato/check_mk_configuration.py
@@ -304,12 +304,15 @@ register_configvar(group,
register_configvar(group,
"start_url",
- TextAscii(title = _("Start URL to display in main frame"),
- help = _("When you point your browser to the Check_MK GUI, usually the dashboard "
- "is shown in the main (right) frame. You can replace this with any other "
- "URL you like here."),
- size = 80,
- attrencode = True),
+ TextAscii(
+ title = _("Start URL to display in main frame"),
+ help = _("When you point your browser to the Check_MK GUI, usually the dashboard "
+ "is shown in the main (right) frame. You can replace this with any other "
+ "URL you like here."),
+ size = 80,
+ allow_empty = False,
+ validate = utils.validate_start_url,
+ ),
domain = "multisite")
register_configvar(group,
diff --git a/cmk/gui/utils.py b/cmk/gui/utils.py
index 23f625f..80fae55 100644
--- a/cmk/gui/utils.py
+++ b/cmk/gui/utils.py
@@ -39,6 +39,7 @@ import cmk.paths
from cmk.gui.i18n import _
from cmk.gui.globals import html
+from cmk.gui.exceptions import MKUserError
def drop_dotzero(v, digits=2):
@@ -95,6 +96,12 @@ def is_allowed_url(url):
return True
+def validate_start_url(value, varprefix):
+ if not is_allowed_url(value):
+ raise MKUserError(varprefix, _("The given value is not allowed. You may only configure "
+ "relative URLs like <tt>dashboard.py?name=my_dashboard</tt>."))
+
+
def cmp_version(a, b):
"""Compare two version numbers with each other
Allow numeric version numbers, but also characters.
diff --git a/cmk/gui/watolib.py b/cmk/gui/watolib.py
index e1b531a..83a177b 100644
--- a/cmk/gui/watolib.py
+++ b/cmk/gui/watolib.py
@@ -10536,7 +10536,6 @@ class LivestatusViaTCP(Dictionary):
kwargs["optional_keys"] = [ "only_from" ]
super(LivestatusViaTCP, self).__init__(**kwargs)
-
#.
# .--CME-----------------------------------------------------------------.
# | ____ __ __ _____ |
Module: check_mk
Branch: master
Commit: 8a7f27ed6156bec61b0c5f73f91a160e8fffc7d1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8a7f27ed6156be…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Aug 29 20:53:27 2018 +0200
6515 Dropped libmcrypt / php-mcrypt dependency
The libmcrypt library and the mcrypt php module is not necessary for Check_MK
and it's major components. We drop it because it is the last dependency on
RedHat distros that is fetched from the EPEL repositories. This means that we
can now skip this step during initial installation and thus simplify the
installation process on these systems a bit more.
The only component left that uses libmcrypt is the fairly old NSCA receiver
which is still shipped with Check_MK. We keep this component for the moment
since it's used by several installations and we currently have no 1:1
replacement for it. In case you need to use NSCAs encryption, which is highly
recommended when you use NSCA, you may have to install libmcrypt by hand to
make it work.
Change-Id: If15cedea5cd3d20323ec469ee102db17d1787618
---
.werks/6515 | 21 +++++++++++++++++++++
omd/distros/CENTOS_5.mk | 1 -
omd/distros/CENTOS_6.mk | 1 -
omd/distros/CENTOS_7.mk | 1 -
omd/distros/DEBIAN_5.mk | 1 -
omd/distros/DEBIAN_6.mk | 1 -
omd/distros/DEBIAN_7.mk | 1 -
omd/distros/DEBIAN_8.mk | 1 -
omd/distros/DEBIAN_9.mk | 1 -
omd/distros/SLES_11SP1.mk | 1 -
omd/distros/SLES_11SP2.mk | 1 -
omd/distros/SLES_11SP3.mk | 1 -
omd/distros/SLES_11SP4.mk | 1 -
omd/distros/SLES_12.mk | 1 -
omd/distros/SLES_12SP1.mk | 1 -
omd/distros/SLES_12SP2.mk | 1 -
omd/distros/SLES_12SP3.mk | 1 -
omd/distros/SLES_15.mk | 1 -
omd/distros/UBUNTU_12.04.mk | 1 -
omd/distros/UBUNTU_13.04.mk | 1 -
omd/distros/UBUNTU_14.04.mk | 1 -
omd/distros/UBUNTU_15.04.mk | 1 -
omd/distros/UBUNTU_16.04.mk | 1 -
omd/distros/UBUNTU_16.10.mk | 1 -
omd/distros/UBUNTU_17.04.mk | 1 -
omd/distros/UBUNTU_17.10.mk | 1 -
26 files changed, 21 insertions(+), 25 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=8a7f27ed61…