Module: check_mk
Branch: master
Commit: 6297fd6664d473e780f0b4cbed869d03a1ed7a99
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6297fd6664d473…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jul 13 16:28:40 2017 +0200
WK4849: Windows mrpe scripts: strip leading whitespaces in mrpe command
Change-Id: I677cd96474bd0e8dd87c858399c3cbb011487af3
---
.werks/4849 | 14 ++++++++++++++
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 1340416 -> 1340416 bytes
agents/windows/check_mk_agent-64.unstripped.exe | Bin 15809577 -> 15809577 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 1340416 -> 1340416 bytes
agents/windows/check_mk_agent.exe | Bin 1318400 -> 1318400 bytes
agents/windows/check_mk_agent.msi | Bin 2928640 -> 2928640 bytes
agents/windows/check_mk_agent.unstripped.exe | Bin 13668491 -> 13668491 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 1318400 -> 1318400 bytes
agents/windows/crash.exe | Bin 101624 -> 101624 bytes
agents/windows/install_agent-64.exe | Bin 591916 -> 591884 bytes
agents/windows/install_agent.exe | Bin 589458 -> 589468 bytes
agents/windows/nowin.exe | Bin 103760 -> 103760 bytes
agents/windows/types.cc | 2 +-
14 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/4849 b/.werks/4849
new file mode 100644
index 0000000..7346892
--- /dev/null
+++ b/.werks/4849
@@ -0,0 +1,14 @@
+Title: Windows mrpe scripts: strip leading whitespaces in mrpe command
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1499955482
+
+The windows agent did not remove leading whitespaces of the specified command.
+This caused errors whenever the agent directory path was prepended to the mrpe command.
+
+
diff --git a/agents/windows/build_version b/agents/windows/build_version
index 88ebae5..3426aa9 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-2846
+2852
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index 17522d1..f46697f 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 fc6580e..b439a75 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 b572492..8c854fe 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 7592877..6173516 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 b1709a3..e11ead7 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 ff3b25a..a249a85 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 97d96ac..159254d 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/crash.exe b/agents/windows/crash.exe
index e08ac78..e1c56a2 100755
Binary files a/agents/windows/crash.exe and b/agents/windows/crash.exe differ
diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe
index 8c62ddb..78cb058 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 d7aea94..74a8c16 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ
diff --git a/agents/windows/nowin.exe b/agents/windows/nowin.exe
index f1b8248..6762bdf 100755
Binary files a/agents/windows/nowin.exe and b/agents/windows/nowin.exe differ
diff --git a/agents/windows/types.cc b/agents/windows/types.cc
index 639cf24..8d5fe50 100644
--- a/agents/windows/types.cc
+++ b/agents/windows/types.cc
@@ -97,7 +97,7 @@ mrpe_entry *from_string<mrpe_entry *>(const std::string
&value) {
if (env != nullptr) {
snprintf(result->command_line, sizeof(result->command_line),
"%s\\%s", env->agentDirectory().c_str(),
- command_line.c_str());
+ lstrip(command_line.c_str()));
} else {
fprintf(stderr, "No environment\n");
return nullptr;