From b717b1d56c41138ec279cf770d0e7cae1c21691b Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Tue, 8 Sep 2015 10:40:35 +0200 Subject: [PATCH] Allow POSIX extended regexps for module preconditions. --- pandora_agents/win32/modules/pandora_module.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_agents/win32/modules/pandora_module.cc b/pandora_agents/win32/modules/pandora_module.cc index 807d28ba7f..6f46aa9c86 100644 --- a/pandora_agents/win32/modules/pandora_module.cc +++ b/pandora_agents/win32/modules/pandora_module.cc @@ -1170,7 +1170,7 @@ Pandora_Module::addGenericCondition (string condition, list **condi cond->string_value = string_value; cond->command = command; cond->command = "cmd.exe /c \"" + cond->command + "\""; - if (regcomp (&(cond->regexp), string_value, 0) != 0) { + if (regcomp (&(cond->regexp), string_value, REG_EXTENDED) != 0) { pandoraDebug ("Invalid regular expression %s", string_value); delete (cond); return; @@ -1242,7 +1242,7 @@ Pandora_Module::addIntensiveCondition (string condition) { } else if (sscanf (condition.c_str (), "=~ %1023s", string_value) == 1) { cond->operation = "=~"; cond->string_value = string_value; - if (regcomp (&(cond->regexp), string_value, 0) != 0) { + if (regcomp (&(cond->regexp), string_value, REG_EXTENDED) != 0) { pandoraDebug ("Invalid regular expression %s", string_value); delete (cond); return;