Module: check_mk
Branch: master
Commit: a0776fb810acfebe4e0519e2c6c2704a39abbc44
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a0776fb810acfe…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 4 12:14:08 2013 +0100
Windows agent: avoid executing plugins and local when disabled
---
agents/windows/check_mk_agent.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/agents/windows/check_mk_agent.cc b/agents/windows/check_mk_agent.cc
index 4b3a592..6a25e89 100755
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -2410,8 +2410,8 @@ DWORD WINAPI ScriptWorkerThread(LPVOID lpParam)
void run_script_container(script_container *cont)
{
- if ( (cont->type == PLUGIN && ! enabled_sections &&
SECTION_PLUGINS) ||
- (cont->type == LOCAL && ! enabled_sections && SECTION_LOCAL)
)
+ if ( (cont->type == PLUGIN && !(enabled_sections & SECTION_PLUGINS))
||
+ (cont->type == LOCAL && !(enabled_sections & SECTION_LOCAL)) )
return;
time_t now = time(0);