minor fix inherited os selection remote_execution_modules

This commit is contained in:
fbsanchez 2019-10-11 13:54:00 +02:00
parent 4c6d924495
commit 0abbcb4150
1 changed files with 3 additions and 1 deletions

View File

@ -470,7 +470,9 @@ sub exec_network_module ($$$$) {
my $retries = $module->{'max_retries'};
my $target_os = pandora_get_os($dbh, $module->{'custom_string_2'});
if (!defined($target_os) || "$target_os" eq '0') {
if ($module->{'custom_string_2'} eq "inherited" ) {
$target_os = $agent_row->{'id_os'};
} elsif (!defined($target_os) || "$target_os" eq '0') {
$target_os = $agent_row->{'id_os'};
}