Module: check_mk
Branch: master
Commit: 1521440b6a3d03a448fa5c859b5c44cb394ff1b8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1521440b6a3d03…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Fri Oct 16 10:54:03 2015 +0200
The windows agent in the recent releases, when started as a service fell back to using the
current
working directory when started as a service. For a service this is c:/windows/system32
---
.werks/2660 | 11 +++++++++++
ChangeLog | 1 +
agents/windows/Environment.cc | 1 -
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 830464 -> 830464 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 830464 -> 830464 bytes
agents/windows/check_mk_agent.cc | 4 ++--
agents/windows/check_mk_agent.exe | Bin 748032 -> 748032 bytes
agents/windows/check_mk_agent.msi | Bin 1836544 -> 1836544 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 748032 -> 748032 bytes
agents/windows/install_agent-64.exe | Bin 383129 -> 383137 bytes
agents/windows/install_agent.exe | Bin 374076 -> 374078 bytes
12 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/.werks/2660 b/.werks/2660
new file mode 100644
index 0000000..4d2f7f6
--- /dev/null
+++ b/.werks/2660
@@ -0,0 +1,11 @@
+Title: fixed windows agent using the wrong working directory
+Level: 2
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1444985304
+
+The windows agent in the recent releases, when started as a service fell back to using
the current
+working directory when started as a service. For a service this is c:/windows/system32
diff --git a/ChangeLog b/ChangeLog
index 2b1e5bf..c32dd30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
1.2.7i4:
Checks & Agents:
* 2695 hp_msa_disk, hp_msa_volume: these checks now report more information about
disks and volumes of a HP MSA 2040 Storage System
+ * 2660 FIX: fixed windows agent using the wrong working directory...
Multisite:
* 2680 FIX: LDAP: Fixed exception when syncing groups using configurations from
previous versions...
diff --git a/agents/windows/Environment.cc b/agents/windows/Environment.cc
index 2571ae3..0c59011 100644
--- a/agents/windows/Environment.cc
+++ b/agents/windows/Environment.cc
@@ -91,7 +91,6 @@ void Environment::getAgentDirectory(char *buffer, int size, bool
use_cwd)
if (buffer[strlen(buffer)-1] == '\\') // Remove trailing backslash
buffer[strlen(buffer)-1] = 0;
}
-
}
diff --git a/agents/windows/build_version b/agents/windows/build_version
index 68d5f38..30ce115 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-553
+559
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index 559385d..f4de09e 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 99d7d46..4ae052b 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 26a2ef8..fbf7c47 100644
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -3033,7 +3033,7 @@ void WINAPI ServiceMain(DWORD, TCHAR* [] )
serviceStatus.dwCurrentState = SERVICE_RUNNING;
SetServiceStatus( serviceStatusHandle, &serviceStatus );
- RunImmediate("adhoc", 0, NULL);
+ RunImmediate("service", 0, NULL);
// service is now stopped
serviceStatus.dwControlsAccepted &= ~(SERVICE_ACCEPT_STOP |
@@ -3997,7 +3997,7 @@ void RunImmediate(const char *mode, int argc, char **argv)
do_test(false, env);
fclose(fileout);
}
- else if (!strcmp(mode, "adhoc"))
+ else if (!strcmp(mode, "adhoc") || !strcmp(mode, "service"))
do_adhoc(env);
else if (!strcmp(mode, "install"))
do_install();
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index ac39027..549307b 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 d062b36..3e82afd 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 67c9306..aeb6a49 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 d095da5..61c3872 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 0a2779b..4b33967 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ