Module: check_mk
Branch: master
Commit: fe2989c3456c13bfbbd61d294d90388812c4f19b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fe2989c3456c13…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Wed Nov 18 08:53:10 2015 +0100
windows agent now supports plugins with file extensions that aren't 3 characters long
---
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 5361545 -> 5361545 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 5361545 -> 5361545 bytes
agents/windows/check_mk_agent.cc | 11 +++++++----
agents/windows/check_mk_agent.exe | Bin 4223010 -> 4223010 bytes
agents/windows/check_mk_agent.msi | Bin 9908224 -> 9908224 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 4223010 -> 4223010 bytes
agents/windows/install_agent-64.exe | Bin 1278652 -> 1278681 bytes
agents/windows/install_agent.exe | Bin 1161631 -> 1161640 bytes
9 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/agents/windows/build_version b/agents/windows/build_version
index bb33380..775971e 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-646
+648
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index 91db67c..840dbf5 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.unversioned.exe
b/agents/windows/check_mk_agent-64.unversioned.exe
index 00a3947..c76c4f2 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.cc b/agents/windows/check_mk_agent.cc
index b74f3b7..668eb7a 100644
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -2292,11 +2292,14 @@ bool banned_exec_name(char *name)
if (strlen(name) < 5)
return false;
- char *extension = name + strlen(name) - 4;
+ const char *extension = strrchr(name, '.');
+ if (extension == NULL) {
+ // ban files without extension
+ return true;
+ }
+
if (g_config->executeSuffixes().size()) {
- if (extension[0] != '.')
- return true;
- extension ++;
+ ++extension;
for (execute_suffixes_t::const_iterator it_ex =
g_config->executeSuffixes().begin();
it_ex != g_config->executeSuffixes().end(); ++it_ex)
if (!strcasecmp(extension, it_ex->c_str()))
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index e872661..883c27d 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 6a2e31a..0660837 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.unversioned.exe
b/agents/windows/check_mk_agent.unversioned.exe
index 2b9cce5..9ab3fe6 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 444c69c..e3a792f 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 c0ae7a4..51c127b 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ