2014-03-20 Sergio Martin <sergio.martin@artica.es>

* lib/PandoraFMS/WMIServer.pm: Move WMI query safe_output 
	function to before the quotes ssubstitution to fix
	any WMI component with double quotes and WMI Wizard



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9620 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2014-03-20 16:04:00 +00:00
parent 2e0e8027cc
commit f902bde134
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2014-03-20 Sergio Martin <sergio.martin@artica.es>
* lib/PandoraFMS/WMIServer.pm: Move WMI query safe_output
function to before the quotes ssubstitution to fix
any WMI component with double quotes and WMI Wizard
2014-03-18 Miguel de Dios <miguel.dedios@artica.es>
* util/pandora_db.pl: fixed the notinit_count in the agents after

View File

@ -159,11 +159,10 @@ sub data_consumer ($$) {
}
# WMI query
my $wmi_query = $module->{'snmp_oid'};
my $wmi_query = safe_output ($module->{'snmp_oid'});
$wmi_query =~ s/\"/\'/g;
$wmi_command .= ' //' . $module->{'ip_target'} . ' "' . $wmi_query . '"';
$wmi_command = safe_output ($wmi_command);
logger ($pa_config, "Executing AM # $module_id WMI command '$wmi_command'", 9);
# Execute command