Module: check_mk
Branch: master
Commit: 797ced14d212c9350508f99ea0944d0daecf6cda
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=797ced14d212c9…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Tue Apr 5 11:04:20 2016 +0200
3113 FIX windows agent: fixed process handle weren't freed when using wmi-based ps
check
---
.werks/3113 | 10 ++++++++++
ChangeLog | 1 +
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 939520 -> 939520 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 939520 -> 939520 bytes
agents/windows/check_mk_agent.cc | 4 ++--
agents/windows/check_mk_agent.exe | Bin 866304 -> 866304 bytes
agents/windows/check_mk_agent.msi | Bin 2067456 -> 2067456 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 866304 -> 866304 bytes
agents/windows/install_agent-64.exe | Bin 431158 -> 431102 bytes
agents/windows/install_agent.exe | Bin 421694 -> 421747 bytes
11 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/3113 b/.werks/3113
new file mode 100644
index 0000000..f80ef1d
--- /dev/null
+++ b/.werks/3113
@@ -0,0 +1,10 @@
+Title: windows agent: fixed process handle weren't freed when using wmi-based ps
check
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1459846850
+
+
diff --git a/ChangeLog b/ChangeLog
index 0a879aa..ad20d98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -125,6 +125,7 @@
* 3020 FIX: netapp_api_volumes: ignore volumes of cluster partner...
* 3022 FIX: mk_logwatch (linux): now able to handle queries from multiple servers (no
longer loosing data)...
* 3112 FIX: esx_vsphere_counters: made levels configurable
+ * 3113 FIX: windows agent: fixed process handle weren't freed when using
wmi-based ps check
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/agents/windows/build_version b/agents/windows/build_version
index f6840a9..0a02468 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-1570
+1572
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index 1cab78f..ba16886 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 3072350..69ae25c 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 b311582..d2be12d 100644
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -914,8 +914,8 @@ void section_ps_wmi(OutputProxy &out) {
while (more) {
int processId = result.get<int>(L"ProcessId");
- HANDLE process = OpenProcess(
- PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, processId);
+ WinHandle process(OpenProcess(
+ PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, processId));
string user = "SYSTEM";
ExtractProcessOwner(process, user);
std::wstring process_name;
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index 0723902..9ef5259 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 2be38ae..e6c6ad2 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 a11f412..0c05d4a 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 8e0e47f..e794de6 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 49dba4a..6ad515d 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ