Module: check_mk
Branch: master
Commit: ea0fc1ba1eea242871f3b13674f696427b85c8c0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ea0fc1ba1eea24…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Dec 12 12:20:06 2016 +0100
4001 FIX Windows Agent: windows agent couldn't handle surrounding quotes at command
specification
Usually the mrpe command should be specified without quotes.
Change-Id: Idd011fad636b5b2824ec9a905742cba9dccd9453
---
.werks/4001 | 10 ++++++++++
ChangeLog | 1 +
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 1326592 -> 1326592 bytes
agents/windows/check_mk_agent-64.unstripped.exe | Bin 15500414 -> 15505551 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 1326592 -> 1326592 bytes
agents/windows/check_mk_agent.exe | Bin 1302016 -> 1302528 bytes
agents/windows/check_mk_agent.msi | Bin 2898432 -> 2898944 bytes
agents/windows/check_mk_agent.unstripped.exe | Bin 13400795 -> 13405932 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 1302016 -> 1302528 bytes
agents/windows/install_agent-64.exe | Bin 585416 -> 585691 bytes
agents/windows/install_agent.exe | Bin 582208 -> 582516 bytes
agents/windows/types.cc | 11 ++++++++++-
13 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/.werks/4001 b/.werks/4001
new file mode 100644
index 0000000..0bd5a45
--- /dev/null
+++ b/.werks/4001
@@ -0,0 +1,10 @@
+Title: Windows Agent: windows agent couldn't handle surrounding quotes at command
specification
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i3
+Date: 1481541522
+Class: fix
+
+Usually the mrpe command should be specified without quotes.
+
diff --git a/ChangeLog b/ChangeLog
index 473c7b3..4cc45a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -54,6 +54,7 @@
* 4114 FIX: innovaphone_licenses: fixed wrong percentage calculation
* 4115 FIX: mem.linux: fixed missing stack bug in PNP template
* 4157 FIX: netapp_api_cluster: fixed None item
+ * 4001 FIX: Windows Agent: windows agent couldn't handle surrounding quotes at
command specification...
Multisite:
* 4070 Added a painter for the service check period
diff --git a/agents/windows/build_version b/agents/windows/build_version
index 1ff3df5..b195055 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-2162
+2188
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index 7b3a677..2b41b2e 100755
Binary files a/agents/windows/check_mk_agent-64.exe and
b/agents/windows/check_mk_agent-64.exe differ
diff --git a/agents/windows/check_mk_agent-64.unstripped.exe
b/agents/windows/check_mk_agent-64.unstripped.exe
index b70ecae..e8c1f5b 100755
Binary files a/agents/windows/check_mk_agent-64.unstripped.exe and
b/agents/windows/check_mk_agent-64.unstripped.exe differ
diff --git a/agents/windows/check_mk_agent-64.unversioned.exe
b/agents/windows/check_mk_agent-64.unversioned.exe
index 9b2b092..f384b97 100755
Binary files a/agents/windows/check_mk_agent-64.unversioned.exe and
b/agents/windows/check_mk_agent-64.unversioned.exe differ
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index e8b3488..51a56e1 100755
Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe
differ
diff --git a/agents/windows/check_mk_agent.msi b/agents/windows/check_mk_agent.msi
index ec69272..f1e4e0d 100755
Binary files a/agents/windows/check_mk_agent.msi and b/agents/windows/check_mk_agent.msi
differ
diff --git a/agents/windows/check_mk_agent.unstripped.exe
b/agents/windows/check_mk_agent.unstripped.exe
index 63eccc3..9003aa9 100755
Binary files a/agents/windows/check_mk_agent.unstripped.exe and
b/agents/windows/check_mk_agent.unstripped.exe differ
diff --git a/agents/windows/check_mk_agent.unversioned.exe
b/agents/windows/check_mk_agent.unversioned.exe
index 7e31782..49b47bb 100755
Binary files a/agents/windows/check_mk_agent.unversioned.exe and
b/agents/windows/check_mk_agent.unversioned.exe differ
diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe
index 3550465..541d628 100755
Binary files a/agents/windows/install_agent-64.exe and
b/agents/windows/install_agent-64.exe differ
diff --git a/agents/windows/install_agent.exe b/agents/windows/install_agent.exe
index de8be91..1229417 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ
diff --git a/agents/windows/types.cc b/agents/windows/types.cc
index fde408d..3dc24b3 100644
--- a/agents/windows/types.cc
+++ b/agents/windows/types.cc
@@ -74,7 +74,16 @@ mrpe_entry *from_string<mrpe_entry *>(const std::string
&value) {
{
std::stringstream str(value);
getline(str, service_description, ' ');
- getline(str, command_line, ' ');
+ getline(str, command_line);
+ }
+
+
+ // Strip any " from start and end
+ if (!command_line.empty() && command_line.front() == '"') {
+ command_line = command_line.substr(1);
+ }
+ if (!command_line.empty() && command_line.back() == '"') {
+ command_line = command_line.substr(0, command_line.length() - 1);
}
if (command_line.empty()) {