From 514d2b63af108729ada825b9b3dc11ea4e4baca3 Mon Sep 17 00:00:00 2001 From: ramonn Date: Mon, 11 Mar 2013 11:51:32 +0000 Subject: [PATCH] 2013-03-11 Ramon Novoa * unix/pandora_agent: Added debugging information to the execution of module_exec modules. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7823 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_agents/ChangeLog | 5 +++++ pandora_agents/unix/pandora_agent | 2 ++ 2 files changed, 7 insertions(+) diff --git a/pandora_agents/ChangeLog b/pandora_agents/ChangeLog index 4e86b4b863..3b0d481bae 100644 --- a/pandora_agents/ChangeLog +++ b/pandora_agents/ChangeLog @@ -1,3 +1,8 @@ +2013-03-11 Ramon Novoa + + * unix/pandora_agent: Added debugging information to the execution of + module_exec modules. + 2012-08-03 Ramon Novoa * win32/modules/pandora_module_logevent.cc: Get the EventID from the diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index f5a8219bd5..8837c9cd20 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1322,9 +1322,11 @@ sub module_exec ($) { # Execute the command if ($module->{'timeout'} == 0) { @data = `$params 2> $DevNull`; + log_message ('debug', "Executing module " . $module->{'name'} . " ($params 2> $DevNull)") if ($Conf{'debug'} eq '1'); } else { my $cmd = quotemeta ($params); @data = `$Conf{'pandora_exec'} $module->{'timeout'} $cmd 2> $DevNull`; + log_message ('debug', "Executing module " . $module->{'name'} . ' (' . $Conf{'pandora_exec'} . ' ' . $module->{'timeout'} . " $cmd 2> $DevNull)") if ($Conf{'debug'} eq '1'); } # Something went wrong or no data