Module: check_mk
Branch: master
Commit: 414b31d6f11b8794548031b74006d4d11a2dd500
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=414b31d6f11b87…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jul 5 13:07:20 2017 +0200
4843 FIX Windows Agent / logfile monitoring: fixed agent crash when * was used as file
wildcard
Change-Id: I2465c7892e782ef6308403d2a574b08c289785a5
---
.werks/4843 | 10 ++++++++++
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 15823789 -> 15823789 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 13682205 -> 13682205 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 1318400 -> 1318400 bytes
agents/windows/crash.exe | Bin 358864 -> 101624 bytes
agents/windows/install_agent-64.exe | Bin 591866 -> 591911 bytes
agents/windows/install_agent.exe | Bin 589524 -> 589544 bytes
agents/windows/nowin.exe | Bin 361000 -> 103760 bytes
agents/windows/plugins/mk_jolokia.exe | Bin 10106761 -> 10106761 bytes
agents/windows/sections/SectionLogwatch.cc | 5 +++--
15 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/4843 b/.werks/4843
new file mode 100644
index 0000000..8428051
--- /dev/null
+++ b/.werks/4843
@@ -0,0 +1,10 @@
+Title: Windows Agent / logfile monitoring: fixed agent crash when * was used as file
wildcard
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1499252787
+Class: fix
+
+
diff --git a/agents/windows/build_version b/agents/windows/build_version
index f06c1c5..295764c 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-2806
+2836
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index 55424fc..4c75bb0 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 24c8ff0..fe982f8 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 909f567..c3d42ad 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 e2dd34d..7a9e5d3 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 28b83e5..9ce298d 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 6193098..909710a 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 06b2cc2..5552095 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 6fec41a..94ff8c7 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 d127af0..e123e9c 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 c0f102b..382e26f 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 8139799..a9cca69 100755
Binary files a/agents/windows/nowin.exe and b/agents/windows/nowin.exe differ
diff --git a/agents/windows/plugins/mk_jolokia.exe
b/agents/windows/plugins/mk_jolokia.exe
index 2fdcbfc..b39cc0d 100755
Binary files a/agents/windows/plugins/mk_jolokia.exe and
b/agents/windows/plugins/mk_jolokia.exe differ
diff --git a/agents/windows/sections/SectionLogwatch.cc
b/agents/windows/sections/SectionLogwatch.cc
index 2242e6a..685f8b0 100644
--- a/agents/windows/sections/SectionLogwatch.cc
+++ b/agents/windows/sections/SectionLogwatch.cc
@@ -122,8 +122,9 @@ std::vector<SectionLogwatch::FileEntryType>
SectionLogwatch::globMatches(
bool more = h != INVALID_HANDLE_VALUE;
while (more) {
- matches.push_back(
- std::make_pair(path + data.cFileName, data.ftLastWriteTime));
+ if (!(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) // Skip directories
+ matches.push_back(
+ std::make_pair(path + data.cFileName, data.ftLastWriteTime));
more = FindNextFile(h, &data);
}
FindClose(h);