Merge remote-tracking branch 'origin/develop' into ent-11291-problemas-deteccion-os-a-partir-del-ticket-10744

This commit is contained in:
Calvo 2023-05-30 12:16:09 +02:00
commit aaddb519c0
40 changed files with 143 additions and 114 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.771-230526 Version: 7.0NG.771-230530
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.771-230526" pandora_version="7.0NG.771-230530"
echo "Test if you has the tools for to make the packages." echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -1023,7 +1023,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.771'; use constant AGENT_VERSION => '7.0NG.771';
use constant AGENT_BUILD => '230526'; use constant AGENT_BUILD => '230530';
# Agent log default file size maximum and instances # Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000; use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux %define name pandorafms_agent_linux
%define version 7.0NG.771 %define version 7.0NG.771
%define release 230526 %define release 230530
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux %define name pandorafms_agent_linux
%define version 7.0NG.771 %define version 7.0NG.771
%define release 230526 %define release 230530
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.771" PI_VERSION="7.0NG.771"
PI_BUILD="230526" PI_BUILD="230530"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{230526} {230530}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.771 Build 230526") #define PANDORA_VERSION ("7.0NG.771 Build 230530")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.771(Build 230526))" VALUE "ProductVersion", "(7.0NG.771(Build 230530))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.771-230526 Version: 7.0NG.771-230530
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.771-230526" pandora_version="7.0NG.771-230530"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -295,25 +295,25 @@ if (enterprise_installed() === true) {
$cps_val = $cps; $cps_val = $cps;
} }
} }
}
// Parent agents. // Parent agents.
$paramsParentAgent = []; $paramsParentAgent = [];
$paramsParentAgent['return'] = true; $paramsParentAgent['return'] = true;
$paramsParentAgent['show_helptip'] = false; $paramsParentAgent['show_helptip'] = false;
$paramsParentAgent['input_name'] = 'id_parent'; $paramsParentAgent['input_name'] = 'id_parent';
$paramsParentAgent['print_hidden_input_idagent'] = true; $paramsParentAgent['print_hidden_input_idagent'] = true;
$paramsParentAgent['hidden_input_idagent_name'] = 'id_agent_parent'; $paramsParentAgent['hidden_input_idagent_name'] = 'id_agent_parent';
$paramsParentAgent['hidden_input_idagent_value'] = $id_parent; $paramsParentAgent['hidden_input_idagent_value'] = $id_parent;
$paramsParentAgent['value'] = db_get_value('alias', 'tagente', 'id_agente', $id_parent); $paramsParentAgent['value'] = db_get_value('alias', 'tagente', 'id_agente', $id_parent);
$paramsParentAgent['selectbox_id'] = 'cascade_protection_module'; $paramsParentAgent['selectbox_id'] = 'cascade_protection_module';
$paramsParentAgent['javascript_is_function_select'] = true; $paramsParentAgent['javascript_is_function_select'] = true;
$paramsParentAgent['cascade_protection'] = true; $paramsParentAgent['cascade_protection'] = true;
$paramsParentAgent['input_style'] = 'width: 100%;'; $paramsParentAgent['input_style'] = 'width: 100%;';
if ($id_agente !== 0) { if ($id_agente !== 0) {
// Deletes the agent's offspring. // Deletes the agent's offspring.
$paramsParentAgent['delete_offspring_agents'] = $id_agente; $paramsParentAgent['delete_offspring_agents'] = $id_agente;
}
} }
$listIcons = gis_get_array_list_icons(); $listIcons = gis_get_array_list_icons();
@ -631,15 +631,18 @@ $tableAdvancedAgent->style = [];
$tableAdvancedAgent->cellclass = []; $tableAdvancedAgent->cellclass = [];
$tableAdvancedAgent->colspan = []; $tableAdvancedAgent->colspan = [];
$tableAdvancedAgent->rowspan = []; $tableAdvancedAgent->rowspan = [];
// Secondary groups.
$tableAdvancedAgent->data['secondary_groups'][] = html_print_label_input_block( if (enterprise_installed() === true) {
__('Secondary groups'), // Secondary groups.
html_print_select_agent_secondary( $tableAdvancedAgent->data['secondary_groups'][] = html_print_label_input_block(
$agent, __('Secondary groups'),
$id_agente, html_print_select_agent_secondary(
['selected_post' => $secondary_groups] $agent,
) $id_agente,
); ['selected_post' => $secondary_groups]
)
);
}
// Parent agent. // Parent agent.
$tableAdvancedAgent->data['parent_agent'][] = html_print_label_input_block( $tableAdvancedAgent->data['parent_agent'][] = html_print_label_input_block(
@ -795,8 +798,6 @@ if (enterprise_installed() === true) {
'', '',
'w540px', 'w540px',
'', '',
// Autocomplete.
'new-password'
); );
} else { } else {
$urlAddressInput = html_print_input_text( $urlAddressInput = html_print_input_text(
@ -903,18 +904,16 @@ $tableAdvancedAgent->data['safe_operation'][] = html_print_label_input_block(
) )
); );
if (enterprise_installed() === true) { ui_toggle(
ui_toggle( html_print_table($tableAdvancedAgent, true),
html_print_table($tableAdvancedAgent, true), '<span class="subsection_header_title">'.__('Advanced options').'</span>',
'<span class="subsection_header_title">'.__('Advanced options').'</span>', '',
'', '',
'', true,
true, false,
false, 'white_box_content',
'white_box_content', 'no-border white_table_graph'
'no-border white_table_graph' );
);
}
// Custom fields. // Custom fields.
$customOutputData = ''; $customOutputData = '';

View File

@ -109,7 +109,7 @@ if ($create_profiles) {
} else { } else {
foreach ($profiles_id as $profile) { foreach ($profiles_id as $profile) {
// Check profiles permissions for non admin user. // Check profiles permissions for non admin user.
if (is_user_admin($config['user_id']) === false) { if (is_user_admin($config['id_user']) === false) {
$user_profiles = profile_get_profiles( $user_profiles = profile_get_profiles(
[ [
'pandora_management' => '<> 1', 'pandora_management' => '<> 1',
@ -122,7 +122,7 @@ if ($create_profiles) {
AUDIT_LOG_ACL_VIOLATION, AUDIT_LOG_ACL_VIOLATION,
'Trying to add administrator profile whith standar user for user '.io_safe_input($user) 'Trying to add administrator profile whith standar user for user '.io_safe_input($user)
); );
exit; continue;
} }
} }
@ -132,7 +132,7 @@ if ($create_profiles) {
AUDIT_LOG_ACL_VIOLATION, AUDIT_LOG_ACL_VIOLATION,
'Trying to add profile group without permission for user '.io_safe_input($user) 'Trying to add profile group without permission for user '.io_safe_input($user)
); );
exit; continue;
} }
foreach ($users_id as $user) { foreach ($users_id as $user) {
@ -141,7 +141,7 @@ if ($create_profiles) {
AUDIT_LOG_ACL_VIOLATION, AUDIT_LOG_ACL_VIOLATION,
'Trying to edit user without permission for user '.io_safe_input($user) 'Trying to edit user without permission for user '.io_safe_input($user)
); );
exit; continue;
} }
$profile_data = db_get_row_filter('tusuario_perfil', ['id_usuario' => $user, 'id_perfil' => $profile, 'id_grupo' => $group]); $profile_data = db_get_row_filter('tusuario_perfil', ['id_usuario' => $user, 'id_perfil' => $profile, 'id_grupo' => $group]);

View File

@ -327,7 +327,7 @@ $table->data[10][2] = __('Discard unknown events');
$table->data[10][3] = html_print_checkbox( $table->data[10][3] = html_print_checkbox(
'throw_unknown_events', 'throw_unknown_events',
1, 1,
network_components_is_disable_type_event($id, EVENTS_GOING_UNKNOWN), network_components_is_disable_type_event(($id === 0) ? false : $id, EVENTS_GOING_UNKNOWN),
true true
); );

View File

@ -46,6 +46,8 @@ if (json_last_error() === JSON_ERROR_NONE) {
$session_id = $data_decoded['session_id']; $session_id = $data_decoded['session_id'];
$type_graph_pdf = $data_decoded['type_graph_pdf']; $type_graph_pdf = $data_decoded['type_graph_pdf'];
$id_user = $data_decoded['id_user']; $id_user = $data_decoded['id_user'];
$slicebar = $data_decoded['slicebar'];
$slicebar_value = $data_decoded['slicebar_value'];
$data_combined = []; $data_combined = [];
if (isset($data_decoded['data_combined']) === true) { if (isset($data_decoded['data_combined']) === true) {
@ -64,6 +66,9 @@ global $config;
// Care whit this!!! check_login not working if you remove this. // Care whit this!!! check_login not working if you remove this.
$config['id_user'] = $id_user; $config['id_user'] = $id_user;
$_SESSION['id_usuario'] = $id_user; $_SESSION['id_usuario'] = $id_user;
if (!isset($config[$slicebar])) {
$config[$slicebar] = $slicebar_value;
}
// Try to initialize session using existing php session id. // Try to initialize session using existing php session id.
$user = new PandoraFMS\User(['phpsessionid' => $session_id]); $user = new PandoraFMS\User(['phpsessionid' => $session_id]);

View File

@ -20,7 +20,7 @@
/** /**
* Pandora build version and version * Pandora build version and version
*/ */
$build_version = 'PC230526'; $build_version = 'PC230530';
$pandora_version = 'v7.0NG.771'; $pandora_version = 'v7.0NG.771';
// Do not overwrite default timezone set if defined. // Do not overwrite default timezone set if defined.

View File

@ -1190,30 +1190,32 @@ function mysql_db_format_array_to_update_sql($values)
$fields = []; $fields = [];
foreach ($values as $field => $value) { foreach ($values as $field => $value) {
if (is_numeric($field)) { if (is_object($value) === false) {
array_push($fields, $value); if (is_numeric($field)) {
continue; array_push($fields, $value);
} else if ($field[0] == '`') { continue;
$field = str_replace('`', '', $field); } else if ($field[0] == '`') {
} $field = str_replace('`', '', $field);
if ($value === null) {
$sql = sprintf('`%s` = NULL', $field);
} else if (is_int($value) || is_bool($value)) {
$sql = sprintf('`%s` = %d', $field, $value);
} else if (is_float($value) || is_double($value)) {
$sql = sprintf('`%s` = %f', $field, $value);
} else {
// String
if (isset($value[0]) && $value[0] == '`') {
// Don't round with quotes if it references a field
$sql = sprintf('`%s` = %s', $field, $value);
} else {
$sql = sprintf("`%s` = '%s'", $field, $value);
} }
}
array_push($fields, $sql); if ($value === null) {
$sql = sprintf('`%s` = NULL', $field);
} else if (is_int($value) || is_bool($value)) {
$sql = sprintf('`%s` = %d', $field, $value);
} else if (is_float($value) || is_double($value)) {
$sql = sprintf('`%s` = %f', $field, $value);
} else {
// String
if (isset($value[0]) && $value[0] == '`') {
// Don't round with quotes if it references a field
$sql = sprintf('`%s` = %s', $field, $value);
} else {
$sql = sprintf("`%s` = '%s'", $field, $value);
}
}
array_push($fields, $sql);
}
} }
return implode(', ', $fields); return implode(', ', $fields);

View File

@ -3548,6 +3548,25 @@ function update_config_token($cfgtoken, $cfgvalue)
} }
function update_check_config_token($cfgtoken, $cfgvalue)
{
global $config;
db_process_sql('START TRANSACTION');
if (isset($config[$cfgtoken])) {
delete_config_token($cfgtoken);
}
$insert = db_process_sql(sprintf("INSERT INTO tconfig (token, value) VALUES ('%s', '%s')", $cfgtoken, $cfgvalue));
db_process_sql('COMMIT');
if ($insert) {
$config[$cfgtoken] = $cfgvalue;
return true;
} else {
return false;
}
}
function delete_config_token($cfgtoken) function delete_config_token($cfgtoken)
{ {
$delete = db_process_sql(sprintf('DELETE FROM tconfig WHERE token = "%s"', $cfgtoken)); $delete = db_process_sql(sprintf('DELETE FROM tconfig WHERE token = "%s"', $cfgtoken));
@ -4284,6 +4303,8 @@ function generator_chart_to_pdf(
'data_module_list' => $module_list, 'data_module_list' => $module_list,
'data_combined' => $params_combined, 'data_combined' => $params_combined,
'id_user' => $config['id_user'], 'id_user' => $config['id_user'],
'slicebar' => $_SESSION['slicebar'],
'slicebar_value' => $config[$_SESSION['slicebar']],
]; ];
} else { } else {
$data = [ $data = [
@ -4291,6 +4312,8 @@ function generator_chart_to_pdf(
'session_id' => $session_id, 'session_id' => $session_id,
'type_graph_pdf' => $type_graph_pdf, 'type_graph_pdf' => $type_graph_pdf,
'id_user' => $config['id_user'], 'id_user' => $config['id_user'],
'slicebar' => $_SESSION['slicebar'],
'slicebar_value' => $config[$_SESSION['slicebar']],
]; ];
} }

View File

@ -818,9 +818,16 @@ function inventory_get_datatable(
function get_data_basic_info_sql($params, $count=false) function get_data_basic_info_sql($params, $count=false)
{ {
$table = 'tagente';
if (is_metaconsole() === true) {
$table = 'tmetaconsole_agent';
}
$where = 'WHERE 1=1 '; $where = 'WHERE 1=1 ';
if ($params['id_agent'] > 0) { if ($params['id_agent'] > 0 && $count === true) {
$where .= sprintf(' AND id_agente = %d', $params['id_agent']); $where .= sprintf(' AND id_agente = %d', $params['id_agent']);
} else if ($params['id_agent'] > 0 && $count === false) {
$where .= sprintf(' AND %s.id_agente = %d', $table, $params['id_agent']);
} }
if ($params['id_group'] > 0) { if ($params['id_group'] > 0) {
@ -897,11 +904,6 @@ function get_data_basic_info_sql($params, $count=false)
$innerjoin = ''; $innerjoin = '';
$groupby = ''; $groupby = '';
$table = 'tagente';
if (is_metaconsole() === true) {
$table = 'tmetaconsole_agent';
}
if ($count !== true) { if ($count !== true) {
$fields = '*'; $fields = '*';
$innerjoin = 'LEFT JOIN tagente_estado ON '.$table.'.id_agente = tagente_estado.id_agente '; $innerjoin = 'LEFT JOIN tagente_estado ON '.$table.'.id_agente = tagente_estado.id_agente ';

View File

@ -31,7 +31,7 @@ function network_components_is_disable_type_event($id=false, $type_event=false)
if ($id === false) { if ($id === false) {
switch ($type_event) { switch ($type_event) {
case EVENTS_GOING_UNKNOWN: case EVENTS_GOING_UNKNOWN:
return true; return false;
break; break;
case EVENTS_UNKNOWN: case EVENTS_UNKNOWN:

View File

@ -9123,7 +9123,7 @@ function reporting_availability($report, $content, $date=false, $time=false)
modules_get_agentmodule_agent($item['id_agent_module']) modules_get_agentmodule_agent($item['id_agent_module'])
); );
if (empty($text)) { if (empty($row['data']['availability_item'])) {
$row['data']['availability_item'] = __('No Address'); $row['data']['availability_item'] = __('No Address');
} }
} else { } else {

View File

@ -756,8 +756,9 @@ function flot_slicesbar_graph(
'server_id' => $server_id, 'server_id' => $server_id,
]; ];
// TO-DO Cambiar esto para que se pase por POST, NO SE PUEDE PASAR POR GET. // TO-DO Cambiar esto para que se pase por POST, NO SE PUEDE PASAR POR GET.
update_config_token($tokem_config, json_encode($graph_data)); update_check_config_token($tokem_config, json_encode($graph_data));
$_SESSION['slicebar'] = $tokem_config;
$_SESSION['slicebar_value'] = json_encode($graph_data);
$graph = '<img src="data:image/png;base64,'; $graph = '<img src="data:image/png;base64,';
$graph .= generator_chart_to_pdf('slicebar', $params); $graph .= generator_chart_to_pdf('slicebar', $params);
$graph .= '" />'; $graph .= '" />';

View File

@ -1548,10 +1548,7 @@ function changePlugin() {
var pluginDescription = pluginAllData.description; var pluginDescription = pluginAllData.description;
var pluginMacros = pluginAllData.macros; var pluginMacros = pluginAllData.macros;
console.log(pluginAllData.macrosElement);
var pluginMacrosElement = JSON.parse(atob(pluginAllData.macrosElement)); var pluginMacrosElement = JSON.parse(atob(pluginAllData.macrosElement));
console.log(pluginMacrosElement);
var displayShow = "none"; var displayShow = "none";
if (executionType == EXECUTION_TYPE_NETWORK) { if (executionType == EXECUTION_TYPE_NETWORK) {
displayShow = "none"; displayShow = "none";

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'> <div style='padding-bottom: 50px'>
<?php <?php
$version = '7.0NG.771'; $version = '7.0NG.771';
$build = '230526'; $build = '230530';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -1041,9 +1041,9 @@ if ($inventory_module !== 'basic') {
<?php <?php
if ($order_by_agent === true) { if ($order_by_agent === true) {
foreach ($rows as $agent_rows) { foreach ($rows as $agent_rows) {
$data = [];
$modules = ''; $modules = '';
foreach ($agent_rows['row'] as $key_row => $row) { foreach ($agent_rows['row'] as $key_row => $row) {
$data = [];
$columns = explode(';', io_safe_output($row['data_format'])); $columns = explode(';', io_safe_output($row['data_format']));
array_push($columns, 'Timestamp'); array_push($columns, 'Timestamp');

View File

@ -344,7 +344,7 @@ if ($view_graph) {
$searchForm .= "<td class='datos w30p'>"; $searchForm .= "<td class='datos w30p'>";
$searchForm .= html_print_label_input_block( $searchForm .= html_print_label_input_block(
__('Time range'), __('Time range'),
html_print_extended_select_for_time('period', $period, '', '', '0', 10, true, 'width:100%') html_print_extended_select_for_time('period', (string) $period, '', '', 0, 10, true, 'width:100%')
); );
$searchForm .= '</td>'; $searchForm .= '</td>';
$searchForm .= '</tr><tr>'; $searchForm .= '</tr><tr>';
@ -376,9 +376,9 @@ if ($view_graph) {
false, false,
'', '',
false false
) ),
['div_id' => 'thresholdDiv']
); );
$searchForm .= '</div>';
$searchForm .= '</td>'; $searchForm .= '</td>';
$searchForm .= "<td class='datos w30p'>"; $searchForm .= "<td class='datos w30p'>";

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.771 %define version 7.0NG.771
%define release 230526 %define release 230530
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.771 %define version 7.0NG.771
%define release 230526 %define release 230530
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.771 %define version 7.0NG.771
%define release 230526 %define release 230530
%define httpd_name httpd %define httpd_name httpd
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name apache2 %define httpd_name apache2

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.771-230526 Version: 7.0NG.771-230530
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.771-230526" pandora_version="7.0NG.771-230530"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -46,7 +46,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.771"; my $pandora_version = "7.0NG.771";
my $pandora_build = "230526"; my $pandora_build = "230530";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -6707,6 +6707,9 @@ sub pandora_get_os ($$) {
if ($os =~ m/Apple/i || $os =~ m/Darwin/i) { if ($os =~ m/Apple/i || $os =~ m/Darwin/i) {
return 8; return 8;
} }
if ($os =~ m/android/i) {
return 15;
}
if ($os =~ m/Linux/i) { if ($os =~ m/Linux/i) {
return 1; return 1;
} }
@ -6719,9 +6722,6 @@ sub pandora_get_os ($$) {
if ($os =~ m/embedded/i) { if ($os =~ m/embedded/i) {
return 14; return 14;
} }
if ($os =~ m/android/i) {
return 15;
}
if ($os =~ m/BSD/i) { if ($os =~ m/BSD/i) {
return 4; return 4;
} }

View File

@ -432,8 +432,8 @@ sub PandoraFMS::Recon::Base::guess_os($$;$) {
my $return = `"$self->{pa_config}->{nmap}" -sSU -T5 -F -O --osscan-limit $device 2>$DEVNULL`; my $return = `"$self->{pa_config}->{nmap}" -sSU -T5 -F -O --osscan-limit $device 2>$DEVNULL`;
return OS_OTHER if ($? != 0); return OS_OTHER if ($? != 0);
my $str_os; my $str_os;
if ($return =~ /Aggressive OS guesses:\s*(.*)|OS details:\s(.*)/) { if ($return =~ /Aggressive OS guesses:(.*?)(?>\(\d+%\),)|^OS details:(.*?)\(.*\)*$/mi) {
if($1 ne "") { if(defined($1) && $1 ne "") {
$str_os = $1; $str_os = $1;
} else { } else {
$str_os = $2; $str_os = $2;

View File

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.771"; my $pandora_version = "7.0NG.771";
my $pandora_build = "230526"; my $pandora_build = "230530";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.771 %define version 7.0NG.771
%define release 230526 %define release 230530
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.771 %define version 7.0NG.771
%define release 230526 %define release 230530
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -9,7 +9,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.771" PI_VERSION="7.0NG.771"
PI_BUILD="230526" PI_BUILD="230530"
MODE=$1 MODE=$1
if [ $# -gt 1 ]; then if [ $# -gt 1 ]; then

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.771 Build 230526"; my $version = "7.0NG.771 Build 230530";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv; Encode::Locale::decode_argv;
# version: define current version # version: define current version
my $version = "7.0NG.771 Build 230526"; my $version = "7.0NG.771 Build 230530";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);