From f19fd978acc6c3c272a28191f13ef9bb6d0b6f7a Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Mon, 18 Oct 2021 12:29:45 +0200 Subject: [PATCH] Do not execute omnishell commands in debug mode. Fixes pandora_enterprise#8087. --- pandora_agents/win32/pandora_windows_service.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pandora_agents/win32/pandora_windows_service.cc b/pandora_agents/win32/pandora_windows_service.cc index 900694183c..f047eb17ff 100644 --- a/pandora_agents/win32/pandora_windows_service.cc +++ b/pandora_agents/win32/pandora_windows_service.cc @@ -2047,16 +2047,15 @@ Pandora_Windows_Service::pandora_run (int forced_run) { this->pandora_init (); } this->checkCollections (); - } - - /* Execute omnishell commands */ - omnishell_path = '"'+Pandora::getPandoraInstallDir (); - omnishell_path += "util\\omnishell_client.exe\" \"" + conf_file+"\""; - if (getPandoraDebug () != false) { - pandoraLog ("Omnishell: Running"); + /* Execute omnishell commands */ + omnishell_path = '"'+Pandora::getPandoraInstallDir (); + omnishell_path += "util\\omnishell_client.exe\" \"" + conf_file+"\""; + if (getPandoraDebug () != false) { + pandoraLog ("Omnishell: Running"); + } + omnishell_output = getValueFromCmdExec(omnishell_path.c_str(), 6000000); } - omnishell_output = getValueFromCmdExec(omnishell_path.c_str(), 6000000); server_addr = conf->getValue ("server_ip");