fixed ImagePath registry entry
Message-ID: <535e2a60.nd1s0/8vMinFypx2%ab(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 7dbb31ce42a0ecc6e4184e602f7e9f150f45d390
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7dbb31ce42a0ec…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Apr 28 12:15:51 2014 +0200
FIX windows agent: register_service: fixed ImagePath registry entry
The registry key ImagePath in
<tt>HKEY_LOCAL_MACHINE\System\CurentControlSet\Services\Check_MK_Agent</tt>
was not quoted correctly. This could trigger a warning on some vulnerability scanners.
---
.werks/907 | 11 +++++++++++
ChangeLog | 1 +
agents/windows/check_mk_agent-64.exe | Bin 204800 -> 204800 bytes
agents/windows/check_mk_agent.cc | 4 +++-
agents/windows/check_mk_agent.exe | Bin 175104 -> 175104 bytes
agents/windows/install_agent-64.exe | Bin 158157 -> 158175 bytes
agents/windows/install_agent.exe | Bin 151408 -> 155326 bytes
7 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/907 b/.werks/907
new file mode 100644
index 0000000..2f2ac15
--- /dev/null
+++ b/.werks/907
@@ -0,0 +1,11 @@
+Title: windows agent: register_service: fixed ImagePath registry entry
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1398679973
+Class: fix
+
+
+The registry key ImagePath in
<tt>HKEY_LOCAL_MACHINE\System\CurentControlSet\Services\Check_MK_Agent</tt>
+was not quoted correctly. This could trigger a warning on some vulnerability scanners.
+
diff --git a/ChangeLog b/ChangeLog
index c88bed1..40d3f51 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,6 +56,7 @@
* 0810 FIX: fritz.link: Not inventorizing "unconfigured" interfaces
anymore
* 0154 FIX: zfsget: Fixed inventory of filesystems
* 0155 FIX: mssql_counters: harded check agains odd agent output
+ * 0907 FIX: windows agent: register_service: fixed ImagePath registry entry...
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled
by filter)
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index b5313de..f54c406 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.cc b/agents/windows/check_mk_agent.cc
index 204b993..615a546 100755
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -3152,10 +3152,12 @@ void InstallService()
char path[ _MAX_PATH + 1 ];
if ( GetModuleFileName( 0, path, sizeof(path)/sizeof(path[0]) ) > 0 )
{
+ char quoted_path[1024];
+ snprintf(quoted_path, sizeof(quoted_path), "\"%s\"",
path);
SC_HANDLE service = CreateService( serviceControlManager,
gszServiceName, gszServiceName,
SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS,
- SERVICE_AUTO_START, SERVICE_ERROR_IGNORE, path,
+ SERVICE_AUTO_START, SERVICE_ERROR_IGNORE, quoted_path,
0, 0, 0, 0, 0 );
if ( service )
{
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index b5cc3f8..75ecbc5 100755
Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe
differ
diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe
index e5ca176..783a9a1 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 6dda9ec..a0acc6c 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ