From 77e465fff90a2df97d835de412711fac9c0d1bcc Mon Sep 17 00:00:00 2001 From: alejandro-campos <alejandro.campos@artica.es> Date: Fri, 11 Sep 2020 14:35:32 +0200 Subject: [PATCH 001/104] fixed errors in massive operations --- .../massive/massive_add_action_alerts.php | 24 +++++++++- .../godmode/massive/massive_add_alerts.php | 28 ++++++++--- .../massive/massive_delete_action_alerts.php | 23 ++++++++- .../massive/massive_delete_modules.php | 45 ++++++++++++++++-- .../godmode/massive/massive_edit_modules.php | 47 +++++++++++++++++-- 5 files changed, 150 insertions(+), 17 deletions(-) diff --git a/pandora_console/godmode/massive/massive_add_action_alerts.php b/pandora_console/godmode/massive/massive_add_action_alerts.php index 9abac11def..52fd5bed07 100755 --- a/pandora_console/godmode/massive/massive_add_action_alerts.php +++ b/pandora_console/godmode/massive/massive_add_action_alerts.php @@ -67,10 +67,30 @@ if ($add) { $modules = get_parameter('module'); $modules_id = []; if (!empty($modules)) { + $modules_id = []; + foreach ($modules as $module) { foreach ($id_agents as $id_agent) { - $module_id = modules_get_agentmodule_id($module, $id_agent); - $modules_id[] = $module_id['id_agente_modulo']; + if ($module == '0') { + // Get all modules of agent. + $agent_modules = db_get_all_rows_filter( + 'tagente_modulo', + ['id_agente' => $id_agent], + 'id_agente_modulo' + ); + + $agent_modules_id = array_map( + function ($field) { + return $field['id_agente_modulo']; + }, + $agent_modules + ); + + $modules_id = array_merge($modules_id, $agent_modules_id); + } else { + $module_id = modules_get_agentmodule_id($module, $id_agent); + $modules_id[] = $module_id['id_agente_modulo']; + } } } diff --git a/pandora_console/godmode/massive/massive_add_alerts.php b/pandora_console/godmode/massive/massive_add_alerts.php index bf52fd0459..7ed99d8277 100755 --- a/pandora_console/godmode/massive/massive_add_alerts.php +++ b/pandora_console/godmode/massive/massive_add_alerts.php @@ -106,15 +106,31 @@ function process_manage_add($id_alert_template, $id_agents, $module_names) return false; } + $modules_id = []; + foreach ($module_names as $module) { foreach ($id_agents as $id_agent) { - $module_id = modules_get_agentmodule_id($module, $id_agent); - $modules_id[] = $module_id['id_agente_modulo']; - } - } + if ($module == '0') { + // Get all modules of agent. + $agent_modules = db_get_all_rows_filter( + 'tagente_modulo', + ['id_agente' => $id_agent], + 'id_agente_modulo' + ); - if (count($module_names) == 1 && $module_names[0] == '0') { - $modules_id = agents_common_modules($id_agents, false, true); + $agent_modules_id = array_map( + function ($field) { + return $field['id_agente_modulo']; + }, + $agent_modules + ); + + $modules_id = array_merge($modules_id, $agent_modules_id); + } else { + $module_id = modules_get_agentmodule_id($module, $id_agent); + $modules_id[] = $module_id['id_agente_modulo']; + } + } } $conttotal = 0; diff --git a/pandora_console/godmode/massive/massive_delete_action_alerts.php b/pandora_console/godmode/massive/massive_delete_action_alerts.php index 832765d4de..5f658fade6 100644 --- a/pandora_console/godmode/massive/massive_delete_action_alerts.php +++ b/pandora_console/godmode/massive/massive_delete_action_alerts.php @@ -66,10 +66,29 @@ if ($delete) { $modules = (array) get_parameter('module'); $modules_id = []; if (!empty($modules)) { + $modules_id = []; foreach ($modules as $module) { foreach ($id_agents as $id_agent) { - $module_id = modules_get_agentmodule_id($module, $id_agent); - $modules_id[] = $module_id['id_agente_modulo']; + if ($module == '0') { + // Get all modules of agent. + $agent_modules = db_get_all_rows_filter( + 'tagente_modulo', + ['id_agente' => $id_agent], + 'id_agente_modulo' + ); + + $agent_modules_id = array_map( + function ($field) { + return $field['id_agente_modulo']; + }, + $agent_modules + ); + + $modules_id = array_merge($modules_id, $agent_modules_id); + } else { + $module_id = modules_get_agentmodule_id($module, $id_agent); + $modules_id[] = $module_id['id_agente_modulo']; + } } } diff --git a/pandora_console/godmode/massive/massive_delete_modules.php b/pandora_console/godmode/massive/massive_delete_modules.php index 7d8d64141a..6b31331d1b 100755 --- a/pandora_console/godmode/massive/massive_delete_modules.php +++ b/pandora_console/godmode/massive/massive_delete_modules.php @@ -450,7 +450,7 @@ $table->data['form_modules_2'][1] = html_print_select( '', false, 'width:100%' -); +).' '.__('Select all modules').' '.html_print_checkbox('select_all_modules', 1, false, true, false, '', false, "class='static'"); $table->data['form_modules_2'][2] = __('When select modules'); $table->data['form_modules_2'][2] .= '<br>'; @@ -522,7 +522,8 @@ $table->data['form_agents_3'][1] = html_print_select( '', false, 'width:100%' -); +).' '.__('Select all agents').' '.html_print_checkbox('select_all_agents', 1, false, true, false, '', false, "class='static'"); + $table->data['form_agents_3'][2] = __('When select agents'); $table->data['form_agents_3'][2] .= '<br>'; $table->data['form_agents_3'][2] .= html_print_select( @@ -588,6 +589,44 @@ if ($selection_mode == 'modules') { var limit_parameters_massive = <?php echo $config['limit_parameters_massive']; ?>; $(document).ready (function () { + $("#checkbox-select_all_modules").change(function() { + if( $('#checkbox-select_all_modules').prop('checked')) { + $("#module_name option").prop('selected', 'selected'); + $("#module_name").trigger('change'); + } else { + $("#module_name option").prop('selected', false); + $("#module_name").trigger('change'); + } + }); + + $("#module_name").change(function() { + var options_length = $("#module_name option").length; + var options_selected_length = $("#module_name option:selected").length; + + if (options_selected_length < options_length) { + $('#checkbox-select_all_modules').prop("checked", false); + } + }); + + $("#checkbox-select_all_agents").change(function() { + if( $('#checkbox-select_all_agents').prop('checked')) { + $("#id_agents option").prop('selected', 'selected'); + $("#id_agents").trigger('change'); + } else { + $("#id_agents option").prop('selected', false); + $("#id_agents").trigger('change'); + } + }); + + $("#id_agents").change(function() { + var options_length = $("#id_agents option").length; + var options_selected_length = $("#id_agents option:selected").length; + + if (options_selected_length < options_length) { + $('#checkbox-select_all_agents').prop("checked", false); + } + }); + $("#id_agents").change(agent_changed_by_multiple_agents); $("#module_name").change(module_changed_by_multiple_modules); @@ -680,7 +719,7 @@ $(document).ready (function () { $('#groups_select').val(-1); } - $('input[type=checkbox]').change ( + $('input[type=checkbox]').not(".static").change ( function () { if (this.id == "checkbox-force_type") { if (this.checked) { diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index 9f25e16c70..3c3975778e 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -406,7 +406,8 @@ $table->data['form_modules_2'][1] = html_print_select( true, true, true -); +).' '.__('Select all modules').' '.html_print_checkbox('select_all_modules', 1, false, true, false, '', false, "class='static'"); + $table->data['form_modules_2'][2] = __('When select modules'); $table->data['form_modules_2'][2] .= '<br>'; $table->data['form_modules_2'][2] .= html_print_select( @@ -491,7 +492,7 @@ $table->data['form_agents_3'][1] = html_print_select( true, true, false -); +).' '.__('Select all agents').' '.html_print_checkbox('select_all_agents', 1, false, true, false, '', false, "class='static'"); $table->data['form_agents_3'][2] = __('When select agents'); $table->data['form_agents_3'][2] .= '<br>'; @@ -1212,7 +1213,45 @@ $(document).ready (function () { return false; } }); - + + $("#checkbox-select_all_modules").change(function() { + if( $('#checkbox-select_all_modules').prop('checked')) { + $("#module_name option").prop('selected', 'selected'); + $("#module_name").trigger('change'); + } else { + $("#module_name option").prop('selected', false); + $("#module_name").trigger('change'); + } + }); + + $("#module_name").change(function() { + var options_length = $("#module_name option").length; + var options_selected_length = $("#module_name option:selected").length; + + if (options_selected_length < options_length) { + $('#checkbox-select_all_modules').prop("checked", false); + } + }); + + $("#checkbox-select_all_agents").change(function() { + if( $('#checkbox-select_all_agents').prop('checked')) { + $("#id_agents option").prop('selected', 'selected'); + $("#id_agents").trigger('change'); + } else { + $("#id_agents option").prop('selected', false); + $("#id_agents").trigger('change'); + } + }); + + $("#id_agents").change(function() { + var options_length = $("#id_agents option").length; + var options_selected_length = $("#id_agents option:selected").length; + + if (options_selected_length < options_length) { + $('#checkbox-select_all_agents').prop("checked", false); + } + }); + $("#text-custom_ip_target").hide(); $("#id_agents").change(agent_changed_by_multiple_agents); @@ -1463,7 +1502,7 @@ $(document).ready (function () { $('#groups_select').val(-1); } - $('input[type=checkbox]').change ( + $('input[type=checkbox]').not(".static").change ( function () { if (this.id == "checkbox-force_type") { if (this.checked) { From a70fc200b7a4167b8e81828ce390fcebc64d8e1c Mon Sep 17 00:00:00 2001 From: "manuel.montes" <manuel.montes@artica.es> Date: Mon, 14 Sep 2020 09:27:01 +0200 Subject: [PATCH 002/104] Fixed bug in unit field --- .../agentes/module_manager_editor_common.php | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index b812e5b8b0..440c4b3d4a 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -535,20 +535,30 @@ $table_advanced->data[0][1] = html_print_input_text( ); $table_advanced->data[0][3] = __('Unit'); -// $table_advanced->data[1][4] = html_print_input_text ('unit', $unit, '', 20, 65, true, -// $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy); -// $table_advanced->colspan[1][4] = 3; -$table_advanced->data[0][4] = html_print_extended_select_for_unit( +$table_advanced->data[0][4] = html_print_input_text ( 'unit', $unit, '', - '', - '0', - false, + 20, + 65, true, + $disabledBecauseInPolicy, false, - false + '', + $classdisabledBecauseInPolicy ); +// $table_advanced->colspan[1][4] = 3; +//$table_advanced->data[0][4] = html_print_extended_select_for_unit( +// 'unit', +// $unit, +// '', +// '', +// '0', +// false, +// true, +// false, +// false +//); $table_advanced->colspan[0][4] = 3; $module_id_policy_module = 0; From 5ce1bd23e4558ddcda2d38a43f7ff335753695b3 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Wed, 7 Oct 2020 10:56:40 +0200 Subject: [PATCH 003/104] Discovery task instead Recon task in some places --- pandora_console/include/functions_groups.php | 2 +- pandora_console/operation/agentes/pandora_networkmap.editor.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index b6c1a5e6c9..2bc8bad8f3 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -104,7 +104,7 @@ function groups_check_used($idGroup) if ($numRows > 0) { $return['return'] = true; - $return['tables'][] = __('Recon task'); + $return['tables'][] = __('Discovery task'); } switch ($config['dbtype']) { diff --git a/pandora_console/operation/agentes/pandora_networkmap.editor.php b/pandora_console/operation/agentes/pandora_networkmap.editor.php index a16874705c..8699253454 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.editor.php +++ b/pandora_console/operation/agentes/pandora_networkmap.editor.php @@ -313,7 +313,7 @@ if ($not_found) { $table->data[6][1] = html_print_input_text('scale_z', $scale_z, '', 2, 10, true).ui_print_help_tip(__('Introduce zoom level. 1 = Highest resolution. Figures may include decimals'), true); $table->data['source'][0] = __('Source'); - $table->data['source'][1] = html_print_radio_button('source', 'group', __('Group'), $source, true, $disabled_source).html_print_radio_button('source', 'recon_task', __('Recon task'), $source, true, $disabled_source).html_print_radio_button('source', 'ip_mask', __('CIDR IP mask'), $source, true, $disabled_source); + $table->data['source'][1] = html_print_radio_button('source', 'group', __('Group'), $source, true, $disabled_source).html_print_radio_button('source', 'recon_task', __('Discovery task'), $source, true, $disabled_source).html_print_radio_button('source', 'ip_mask', __('CIDR IP mask'), $source, true, $disabled_source); $table->data['source_data_recon_task'][0] = __('Source from recon task'); $table->data['source_data_recon_task'][0] .= ui_print_help_tip( From ac4904f1237629c260fad5ae2d909c7acc547794 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Wed, 7 Oct 2020 12:22:46 +0200 Subject: [PATCH 004/104] Avoid host latency "fake" value 0 --- pandora_server/lib/PandoraFMS/NetworkServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/NetworkServer.pm b/pandora_server/lib/PandoraFMS/NetworkServer.pm index 0bca799815..3c0446c956 100644 --- a/pandora_server/lib/PandoraFMS/NetworkServer.pm +++ b/pandora_server/lib/PandoraFMS/NetworkServer.pm @@ -498,7 +498,7 @@ sub exec_network_module ($$$$) { $module_data = pandora_ping_latency ($pa_config, $ip_target, $timeout, $retries); if (defined($module_data)) { - $module_result = 0; # Successful + $module_result = 1; # Unsuccessful } } From ca9b167741bed0c6c8496a51977b6a0f07e172ae Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Fri, 16 Oct 2020 14:00:38 +0200 Subject: [PATCH 005/104] SAML with pandora sessions --- pandora_console/include/auth/mysql.php | 3 +- pandora_console/include/load_session.php | 68 +++++++++++++++++++++--- pandora_console/index.php | 29 +++++----- 3 files changed, 76 insertions(+), 24 deletions(-) diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index 930e2cdbd2..f297089ea0 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -239,8 +239,7 @@ function process_user_login_remote($login, $pass, $api=false) // Unknown authentication method default: - $config['auth_error'] = 'User not found in database - or incorrect password'; + $config['auth_error'] = 'User not found in database or incorrect password'; return false; break; } diff --git a/pandora_console/include/load_session.php b/pandora_console/include/load_session.php index 3575310141..bcc1cc594f 100644 --- a/pandora_console/include/load_session.php +++ b/pandora_console/include/load_session.php @@ -198,11 +198,63 @@ function pandora_session_gc($max_lifetime=300) } -$result_handler = session_set_save_handler( - 'pandora_session_open', - 'pandora_session_close', - 'pandora_session_read', - 'pandora_session_write', - 'pandora_session_destroy', - 'pandora_session_gc' -); +/** + * Enables custom session handlers. + * + * @return boolean Context changed or not. + */ +function enable_session_handlers() +{ + global $config; + + if ($config['_using_pandora_sessionhandlers'] !== true) { + if (session_status() !== PHP_SESSION_NONE) { + // Close previous version. + session_write_close(); + } + + $sesion_handler = session_set_save_handler( + 'pandora_session_open', + 'pandora_session_close', + 'pandora_session_read', + 'pandora_session_write', + 'pandora_session_destroy', + 'pandora_session_gc' + ); + + session_start(); + + // Restore previous session. + $config['_using_pandora_sessionhandlers'] = true; + return $sesion_handler; + } + + return false; +} + + +/** + * Disables custom session handlers. + * + * @return void + */ +function disable_session_handlers() +{ + global $config; + + if (session_status() !== PHP_SESSION_NONE) { + // Close previous version. + session_write_close(); + } + + $ss = new SessionHandler(); + session_set_save_handler($ss, true); + + session_start(); + + $config['_using_pandora_sessionhandlers'] = false; +} + + +// Always enable session handler. +$result_handler = enable_session_handlers(); diff --git a/pandora_console/index.php b/pandora_console/index.php index af8671ded7..43645f69cb 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -395,24 +395,25 @@ if (! isset($config['id_user'])) { $nick_in_db = $_SESSION['prepared_login_da']['id_user']; $expired_pass = false; } else if (($config['auth'] == 'saml') && ($login_button_saml)) { - $saml_configured = include_once $config['homedir'].'/'.ENTERPRISE_DIR.'/include/auth/saml.php'; - - if (!$saml_configured) { + $saml_path = $config['homedir'].'/'.ENTERPRISE_DIR.'/include/auth/saml.php'; + if (!$saml_path) { include_once 'general/noaccesssaml.php'; - } + } else { + include_once $saml_path; - $saml_user_id = saml_process_user_login(); + $saml_user_id = saml_process_user_login(); - if (!$saml_user_id) { - include_once 'general/noaccesssaml.php'; - } + if (!$saml_user_id) { + include_once 'general/noaccesssaml.php'; + } - $nick_in_db = $saml_user_id; - if (!$nick_in_db) { - include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; - $as = new SimpleSAML_Auth_Simple($config['saml_source']); - $as->logout(); + $nick_in_db = $saml_user_id; + if (!$nick_in_db) { + include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; + $as = new SimpleSAML_Auth_Simple($config['saml_source']); + $as->logout(); + } } } else { // process_user_login is a virtual function which should be defined in each auth file. @@ -971,7 +972,7 @@ if (isset($_GET['bye'])) { if ($config['auth'] == 'saml') { include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; - $as = new SimpleSAML_Auth_Simple('PandoraFMS'); + $as = new SimpleSAML_Auth_Simple($config['saml_source']); $as->logout(); } From 30c7da054f6e1227339b3ef74f5b76243f9aa98d Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Fri, 16 Oct 2020 15:24:21 +0200 Subject: [PATCH 006/104] fixes SAML --- pandora_console/include/load_session.php | 8 +++++++- pandora_console/index.php | 6 ++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/load_session.php b/pandora_console/include/load_session.php index bcc1cc594f..883704b8e0 100644 --- a/pandora_console/include/load_session.php +++ b/pandora_console/include/load_session.php @@ -236,9 +236,11 @@ function enable_session_handlers() /** * Disables custom session handlers. * + * @param string|null $id_session Force swap to target session. + * * @return void */ -function disable_session_handlers() +function disable_session_handlers($id_session=null) { global $config; @@ -250,6 +252,10 @@ function disable_session_handlers() $ss = new SessionHandler(); session_set_save_handler($ss, true); + if ($id_session !== null) { + session_id($id_session); + } + session_start(); $config['_using_pandora_sessionhandlers'] = false; diff --git a/pandora_console/index.php b/pandora_console/index.php index 43645f69cb..e87fae5353 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -411,8 +411,7 @@ if (! isset($config['id_user'])) { $nick_in_db = $saml_user_id; if (!$nick_in_db) { include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; - $as = new SimpleSAML_Auth_Simple($config['saml_source']); - $as->logout(); + saml_logout(); } } } else { @@ -972,8 +971,7 @@ if (isset($_GET['bye'])) { if ($config['auth'] == 'saml') { include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; - $as = new SimpleSAML_Auth_Simple($config['saml_source']); - $as->logout(); + saml_logout(); } while (@ob_end_flush()) { From 85ac793e2b7c30e841f0f6063ff79d0570feb8f1 Mon Sep 17 00:00:00 2001 From: Kevin <kevin.rojas@artica.es> Date: Fri, 16 Oct 2020 16:05:57 +0200 Subject: [PATCH 007/104] force folders creation --- pandora_agents/unix/Darwin/dmg/scripts/postinstall | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pandora_agents/unix/Darwin/dmg/scripts/postinstall b/pandora_agents/unix/Darwin/dmg/scripts/postinstall index 2f76310fee..5b25222a37 100644 --- a/pandora_agents/unix/Darwin/dmg/scripts/postinstall +++ b/pandora_agents/unix/Darwin/dmg/scripts/postinstall @@ -26,11 +26,13 @@ else `/usr/local/share/pandora_agent/inst_utilities/print_conf.pl /usr/local/share/pandora_agent/pandora_agent.conf remote_config $REMOTECFG` # Create agent directories and files - mkdir -p /usr/local/share/pandora_agent/collections - mkdir -p /usr/local/share/pandora_agent/commands + mkdir -p /usr/local/bin/ + mkdir -p /usr/local/share/man/man1/ + mkdir -p /usr/local/share/pandora_agent/collections/ + mkdir -p /usr/local/share/pandora_agent/commands/ mkdir -p /etc/pandora/ - mkdir -p /var/spool/pandora/data_out - mkdir -p /var/log/pandora + mkdir -p /var/spool/pandora/data_out/ + mkdir -p /var/log/pandora/ mv pandora_agent.conf /etc/pandora/ touch /var/log/pandora/pandora_agent.log @@ -70,9 +72,9 @@ ln -s /usr/local/share/pandora_agent/collections /etc/pandora/collections # Copy manuals -cp -f man/man1/pandora_agent.1.gz /usr/local/share/man/man1 +cp -f man/man1/pandora_agent.1.gz /usr/local/share/man/man1/ chmod 644 /usr/local/share/man/man1/pandora_agent.1.gz -cp -f man/man1/tentacle_client.1.gz /usr/local/share/man/man1 +cp -f man/man1/tentacle_client.1.gz /usr/local/share/man/man1/ chmod 644 /usr/local/share/man/man1/tentacle_client.1.gz # Create newsyslog entry From ee45d0c684142bcca838b7bed85bd75f9b3ff2ba Mon Sep 17 00:00:00 2001 From: Kevin <kevin.rojas@artica.es> Date: Fri, 16 Oct 2020 16:29:02 +0200 Subject: [PATCH 008/104] Fix autoupdate version issue --- extras/pandora_update_version.sh | 2 +- pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extras/pandora_update_version.sh b/extras/pandora_update_version.sh index 8a16e8e18d..23ea7a4627 100755 --- a/extras/pandora_update_version.sh +++ b/extras/pandora_update_version.sh @@ -143,7 +143,7 @@ done # Darwin dmg installer files echo "Updating DARWIN DMG files..." -sed -i -e "/VERSION/s/=.*/=\"$VERSION\"/" "$AGENT_DARWIN_BUILDER" +sed -i -e "/VERSION/s/=\"7.0NG.*/=\"$VERSION\"/" "$AGENT_DARWIN_BUILDER" sed -i -r "s/(version=\").*(\"\s+onConclusion=)/\1$VERSION\2/g" "$AGENT_DARWIN_DISTR" sed -i -r "s/(CFBundleVersion<\/key>\s*<string>).*(<\/string>)/\1$VERSION\2/g" "$AGENT_DARWIN_PLIST" sed -i -r "s/(CFBundleShortVersionString<\/key>\s*<string>).*(<\/string>)/\1$VERSION\2/g" "$AGENT_DARWIN_PLIST" diff --git a/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh b/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh index 325d149578..95878467ab 100644 --- a/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh +++ b/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh @@ -22,7 +22,7 @@ fi # DMG package version if [ "$#" -ge 2 ]; then - VERSION="7.0NG.750" + VERSION="$2" else VERSION="7.0NG.750" fi @@ -37,7 +37,7 @@ fi BUILD_DMG="$BUILD_PATH/build" BUILD_TMP="$BUILD_PATH/buildtmp" -FULLNAME="7.0NG.749" +FULLNAME="$DMGNAME-$VERSION.dmg" echo "VERSION-"$VERSION" NAME-"$DMGNAME pushd . cd $LOCALINST From 7b73a36eb02e1b28b63cf88b02c6838204cd4b6e Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Fri, 16 Oct 2020 16:41:42 +0200 Subject: [PATCH 009/104] rc1 --- pandora_console/index.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index e87fae5353..8a95702146 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -961,19 +961,23 @@ if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) { // Log off. if (isset($_GET['bye'])) { - include 'general/logoff.php'; $iduser = $_SESSION['id_usuario']; + $samlid = $_SESSION['samlid']; + + // Process logout. + include 'general/logoff.php'; + + if ($config['auth'] == 'saml' && empty($samlid) === false) { + include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; + enterprise_include('include/auth/saml.php'); + enterprise_hook('saml_logout', [$samlid]); + } $_SESSION = []; session_destroy(); header_remove('Set-Cookie'); setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); - if ($config['auth'] == 'saml') { - include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; - saml_logout(); - } - while (@ob_end_flush()) { // Dumping... continue; From f6020e87918206218775dce0f2f3f3ef33c3fbc3 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Mon, 19 Oct 2020 10:59:46 +0200 Subject: [PATCH 010/104] Removed unwanted traces --- pandora_console/general/login_page.php | 7 ++- pandora_console/include/load_session.php | 40 ++++++++----- pandora_console/index.php | 73 +++++++++++++++++------- 3 files changed, 83 insertions(+), 37 deletions(-) diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index c4cd8482bc..97548deee4 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -450,7 +450,12 @@ if ($login_screen == 'logout') { echo '<div class="content_message_alert">'; echo '<div class="text_message_alert">'; echo '<h1>'.__('Logged out').'</h1>'; - echo '<p>'.__('Your session has ended. Please close your browser window to close this %s session.', get_product_name()).'</p>'; + if (empty($config['logout_msg']) === true) { + echo '<p>'.__('Your session has ended. Please close your browser window to close this %s session.', get_product_name()).'</p>'; + } else { + echo '<p>'.__($config['logout_msg']).'</p>'; + } + echo '</div>'; echo '<div class="button_message_alert">'; html_print_submit_button('Ok', 'hide-login-logout', false); diff --git a/pandora_console/include/load_session.php b/pandora_console/include/load_session.php index 883704b8e0..b557edd5d3 100644 --- a/pandora_console/include/load_session.php +++ b/pandora_console/include/load_session.php @@ -64,14 +64,23 @@ function pandora_session_close() function pandora_session_read($session_id) { $session_id = addslashes($session_id); - $session_data = db_get_value( - 'data', - 'tsessions_php', - 'id_session', - $session_id + + // Do not use SQL cache here. + $session_data = db_get_all_rows_sql( + sprintf( + 'SELECT data + FROM `tsessions_php` WHERE id_session="%s"', + $session_id + ), + false, + false ); - if (!empty($session_data)) { + if (is_array($session_data) === true) { + $session_data = $session_data[0]['data']; + } + + if (empty($session_data) === false) { return $session_data; } else { return ''; @@ -90,7 +99,6 @@ function pandora_session_read($session_id) function pandora_session_write($session_id, $data) { $session_id = addslashes($session_id); - if (is_ajax()) { // Avoid session upadte while processing ajax responses - notifications. if (get_parameter('check_new_notifications', false)) { @@ -101,18 +109,22 @@ function pandora_session_write($session_id, $data) $values = []; $values['last_active'] = time(); - if (!empty($data)) { + if (empty($data) === false) { $values['data'] = addslashes($data); } - $session_exists = (bool) db_get_value( - 'COUNT(id_session)', - 'tsessions_php', - 'id_session', - $session_id + // Do not use SQL cache here. + $session_exists = db_get_all_rows_sql( + sprintf( + 'SELECT id_session + FROM `tsessions_php` WHERE id_session="%s"', + $session_id + ), + false, + false ); - if (!$session_exists) { + if ($session_exists === false) { $values['id_session'] = $session_id; $retval_write = db_process_sql_insert('tsessions_php', $values); } else { diff --git a/pandora_console/index.php b/pandora_console/index.php index 8a95702146..56ea0fcd34 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -222,7 +222,7 @@ echo '<head>'."\n"; ob_start('ui_process_page_head'); // Enterprise main. -enterprise_include('index.php'); +enterprise_include_once('index.php'); echo '<script type="text/javascript">'; echo 'var dispositivo = navigator.userAgent.toLowerCase();'; @@ -395,23 +395,25 @@ if (! isset($config['id_user'])) { $nick_in_db = $_SESSION['prepared_login_da']['id_user']; $expired_pass = false; } else if (($config['auth'] == 'saml') && ($login_button_saml)) { - $saml_path = $config['homedir'].'/'.ENTERPRISE_DIR.'/include/auth/saml.php'; - if (!$saml_path) { + enterprise_include_once('include/auth/saml.php'); + $saml_user_id = enterprise_hook('saml_process_user_login'); + if (!$saml_user_id) { include_once 'general/noaccesssaml.php'; - } else { - include_once $saml_path; - - $saml_user_id = saml_process_user_login(); - - if (!$saml_user_id) { - include_once 'general/noaccesssaml.php'; - } + } - $nick_in_db = $saml_user_id; - if (!$nick_in_db) { + $nick_in_db = $saml_user_id; + if (!$nick_in_db) { + $samlid = $_SESSION['samlid']; + $_SESSION = []; + session_destroy(); + header_remove('Set-Cookie'); + setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); + + if ($config['auth'] == 'saml' && empty($samlid) === false) { include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; - saml_logout(); + enterprise_include_once('include/auth/saml.php'); + enterprise_hook('saml_logout', [$samlid]); } } } else { @@ -735,7 +737,7 @@ if (! isset($config['id_user'])) { exit('</html>'); } - } else { + } else if (isset($_GET['bye']) === false) { // There is no user connected. if ($config['enterprise_installed']) { enterprise_include_once('include/functions_reset_pass.php'); @@ -962,22 +964,49 @@ if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) { // Log off. if (isset($_GET['bye'])) { $iduser = $_SESSION['id_usuario']; - $samlid = $_SESSION['samlid']; + + if ($config['auth'] === 'saml') { + include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; + enterprise_include_once('include/auth/saml.php'); + + $samlid = $_SESSION['samlid']; + $saml_logout_state = (string) get_parameter('LogoutState', ''); + + if (empty($saml_logout_state) === false) { + try { + $state = \SimpleSAML\Auth\State::loadState( + $saml_logout_state, + 'MyLogoutState' + ); + $ls = $state['saml:sp:LogoutStatus']; + // Only works for SAML SP. + if ($ls['Code'] === 'urn:oasis:names:tc:SAML:2.0:status:Success' + && isset($ls['SubCode']) === false + ) { + // Successful logout. + $config['logout_msg'] = 'You have been logged out.'; + } else { + // Logout failed. Tell the user to close the browser. + $config['logout_msg'] = 'We were unable to log you out of all your sessions. To be completely sure that you are logged out, you need to close your web browser.'; + } + } catch (Exception $e) { + $config['logout_msg'] = 'Failed to logout from SAML: '.$e->getMessage(); + } + } + } // Process logout. include 'general/logoff.php'; - if ($config['auth'] == 'saml' && empty($samlid) === false) { - include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; - enterprise_include('include/auth/saml.php'); - enterprise_hook('saml_logout', [$samlid]); - } - $_SESSION = []; session_destroy(); header_remove('Set-Cookie'); setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); + if ($config['auth'] == 'saml' && empty($samlid) === false) { + enterprise_hook('saml_logout', [$samlid]); + } + while (@ob_end_flush()) { // Dumping... continue; From 987e77271e23a3176945f87acf1c5d9b8b1ba720 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Mon, 19 Oct 2020 17:42:50 +0200 Subject: [PATCH 011/104] another try --- pandora_console/index.php | 58 ++++++++++++--------------------------- 1 file changed, 18 insertions(+), 40 deletions(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index 56ea0fcd34..cfa342d212 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -404,17 +404,21 @@ if (! isset($config['id_user'])) { $nick_in_db = $saml_user_id; if (!$nick_in_db) { - $samlid = $_SESSION['samlid']; - $_SESSION = []; - session_destroy(); - header_remove('Set-Cookie'); - setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); + if ($config['auth'] !== 'saml' || (bool) get_parameter('LogoutState')) { + $_SESSION = []; + session_destroy(); + header_remove('Set-Cookie'); + setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); + } - if ($config['auth'] == 'saml' && empty($samlid) === false) { + if ($config['auth'] === 'saml') { include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; enterprise_include_once('include/auth/saml.php'); enterprise_hook('saml_logout', [$samlid]); } + + // Process logout. + include 'general/logoff.php'; } } else { // process_user_login is a virtual function which should be defined in each auth file. @@ -965,48 +969,22 @@ if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) { if (isset($_GET['bye'])) { $iduser = $_SESSION['id_usuario']; + if ($config['auth'] !== 'saml' || (bool) get_parameter('LogoutState')) { + $_SESSION = []; + session_destroy(); + header_remove('Set-Cookie'); + setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); + } + if ($config['auth'] === 'saml') { include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; enterprise_include_once('include/auth/saml.php'); - - $samlid = $_SESSION['samlid']; - $saml_logout_state = (string) get_parameter('LogoutState', ''); - - if (empty($saml_logout_state) === false) { - try { - $state = \SimpleSAML\Auth\State::loadState( - $saml_logout_state, - 'MyLogoutState' - ); - $ls = $state['saml:sp:LogoutStatus']; - // Only works for SAML SP. - if ($ls['Code'] === 'urn:oasis:names:tc:SAML:2.0:status:Success' - && isset($ls['SubCode']) === false - ) { - // Successful logout. - $config['logout_msg'] = 'You have been logged out.'; - } else { - // Logout failed. Tell the user to close the browser. - $config['logout_msg'] = 'We were unable to log you out of all your sessions. To be completely sure that you are logged out, you need to close your web browser.'; - } - } catch (Exception $e) { - $config['logout_msg'] = 'Failed to logout from SAML: '.$e->getMessage(); - } - } + enterprise_hook('saml_logout'); } // Process logout. include 'general/logoff.php'; - $_SESSION = []; - session_destroy(); - header_remove('Set-Cookie'); - setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); - - if ($config['auth'] == 'saml' && empty($samlid) === false) { - enterprise_hook('saml_logout', [$samlid]); - } - while (@ob_end_flush()) { // Dumping... continue; From 92211c71b729ae4dca3ca8c5a25c326e4965ed67 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Mon, 19 Oct 2020 18:45:40 +0200 Subject: [PATCH 012/104] trick to avoid simplesamlphp logout bug while using custom session handlers --- pandora_console/index.php | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index cfa342d212..fac333e101 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -273,6 +273,7 @@ if (strlen($search) > 0) { } // Login process. +enterprise_include_once('include/auth/saml.php'); if (! isset($config['id_user'])) { // Clear error messages. unset($_COOKIE['errormsg']); @@ -395,7 +396,6 @@ if (! isset($config['id_user'])) { $nick_in_db = $_SESSION['prepared_login_da']['id_user']; $expired_pass = false; } else if (($config['auth'] == 'saml') && ($login_button_saml)) { - enterprise_include_once('include/auth/saml.php'); $saml_user_id = enterprise_hook('saml_process_user_login'); if (!$saml_user_id) { include_once 'general/noaccesssaml.php'; @@ -404,18 +404,14 @@ if (! isset($config['id_user'])) { $nick_in_db = $saml_user_id; if (!$nick_in_db) { - if ($config['auth'] !== 'saml' || (bool) get_parameter('LogoutState')) { - $_SESSION = []; - session_destroy(); - header_remove('Set-Cookie'); - setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); + if ($config['auth'] === 'saml') { + enterprise_hook('saml_logout'); } - if ($config['auth'] === 'saml') { - include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; - enterprise_include_once('include/auth/saml.php'); - enterprise_hook('saml_logout', [$samlid]); - } + $_SESSION = []; + session_destroy(); + header_remove('Set-Cookie'); + setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); // Process logout. include 'general/logoff.php'; @@ -956,6 +952,10 @@ if (! isset($config['id_user'])) { } exit('</html>'); + } else { + if ($config['auth'] === 'saml') { + enterprise_hook('saml_login_status_verifier'); + } } } } @@ -969,19 +969,16 @@ if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) { if (isset($_GET['bye'])) { $iduser = $_SESSION['id_usuario']; - if ($config['auth'] !== 'saml' || (bool) get_parameter('LogoutState')) { - $_SESSION = []; - session_destroy(); - header_remove('Set-Cookie'); - setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); - } - if ($config['auth'] === 'saml') { - include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; - enterprise_include_once('include/auth/saml.php'); enterprise_hook('saml_logout'); } + $_SESSION = []; + session_destroy(); + header_remove('Set-Cookie'); + setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); + + // Process logout. include 'general/logoff.php'; From 3562192d691d9516677bd796dc85368d84c8a394 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Mon, 19 Oct 2020 18:51:18 +0200 Subject: [PATCH 013/104] minor fix --- pandora_console/index.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index fac333e101..84741eb310 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -408,10 +408,12 @@ if (! isset($config['id_user'])) { enterprise_hook('saml_logout'); } - $_SESSION = []; - session_destroy(); - header_remove('Set-Cookie'); - setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); + if (session_status() !== PHP_SESSION_NONE) { + $_SESSION = []; + session_destroy(); + header_remove('Set-Cookie'); + setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); + } // Process logout. include 'general/logoff.php'; @@ -973,10 +975,12 @@ if (isset($_GET['bye'])) { enterprise_hook('saml_logout'); } - $_SESSION = []; - session_destroy(); - header_remove('Set-Cookie'); - setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); + if (session_status() !== PHP_SESSION_NONE) { + $_SESSION = []; + session_destroy(); + header_remove('Set-Cookie'); + setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); + } // Process logout. From d7f3810bba3dfff7534cbd10405a76e1c0b0ac8a Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Mon, 19 Oct 2020 19:00:00 +0200 Subject: [PATCH 014/104] improved message saml --- pandora_console/index.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index 84741eb310..825d00bc86 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -398,9 +398,15 @@ if (! isset($config['id_user'])) { } else if (($config['auth'] == 'saml') && ($login_button_saml)) { $saml_user_id = enterprise_hook('saml_process_user_login'); if (!$saml_user_id) { - include_once 'general/noaccesssaml.php'; - } + $login_failed = true; + include_once 'general/login_page.php'; + while (@ob_end_flush()) { + // Dumping... + continue; + } + exit('</html>'); + } $nick_in_db = $saml_user_id; if (!$nick_in_db) { From 8b4fd551d1bd12550de13308204296b2d55ed602 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Mon, 19 Oct 2020 19:17:07 +0200 Subject: [PATCH 015/104] minor fixes --- pandora_console/index.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index 825d00bc86..7ff9900150 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -981,13 +981,10 @@ if (isset($_GET['bye'])) { enterprise_hook('saml_logout'); } - if (session_status() !== PHP_SESSION_NONE) { - $_SESSION = []; - session_destroy(); - header_remove('Set-Cookie'); - setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); - } - + $_SESSION = []; + session_destroy(); + header_remove('Set-Cookie'); + setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); // Process logout. include 'general/logoff.php'; From 0f379a28888d8c2289e4d4b486ef3454ef8a9f7b Mon Sep 17 00:00:00 2001 From: Daniel Maya <daniel.maya@artica.es> Date: Tue, 20 Oct 2020 12:38:42 +0200 Subject: [PATCH 016/104] Fixed pagination counter --- pandora_console/extensions/module_groups.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index 76225c0751..50a0de4d78 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -86,7 +86,6 @@ function mainModuleGroups() ); $info = $tree_group->getArray(); $info = groupview_plain_groups($info); - $counter = count($info); $offset = get_parameter('offset', 0); $agent_group_search = get_parameter('agent_group_search', ''); $module_group_search = get_parameter('module_group_search', ''); @@ -134,6 +133,8 @@ function mainModuleGroups() $ids_group = -1; } + $counter = count($info); + $condition_critical = modules_get_state_condition(AGENT_MODULE_STATUS_CRITICAL_ALERT); $condition_warning = modules_get_state_condition(AGENT_MODULE_STATUS_WARNING_ALERT); $condition_unknown = modules_get_state_condition(AGENT_MODULE_STATUS_UNKNOWN); From 3c95d1748225d76ee880b45774e79b0b35ccf712 Mon Sep 17 00:00:00 2001 From: Daniel Maya <daniel.maya@artica.es> Date: Tue, 20 Oct 2020 16:15:42 +0200 Subject: [PATCH 017/104] Fixed new_agent --- .../godmode/agentes/agent_manager.php | 17 ++++++++++------- .../godmode/agentes/modificar_agente.php | 1 - .../operation/agentes/estado_agente.php | 2 -- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index f4014de907..d1c7ae5224 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -149,7 +149,7 @@ if (is_ajax()) { ui_require_javascript_file('openlayers.pandora'); -$new_agent = (bool) get_parameter('new_agent'); +$new_agent = (empty($id_agente)) ? true : false; if (! isset($id_agente) && ! $new_agent) { db_pandora_audit('ACL Violation', 'Trying to access agent manager witout an agent'); @@ -1222,6 +1222,7 @@ ui_require_jquery_file('bgiframe'); $(document).ready (function() { + var $id_agent = '<?php echo $id_agente; ?>'; var previous_primary_group_select; $("#grupo").on('focus', function () { previous_primary_group_select = this.value; @@ -1276,12 +1277,14 @@ ui_require_jquery_file('bgiframe'); } }); - paint_qrcode( - "<?php echo ui_get_full_url('mobile/index.php?page=agent&id='.$id_agente); ?>", - "#qr_code_agent_view", - 128, - 128 - ); + if (typeof $id_agent !== 'undefined' && $id_agent !== '0') { + paint_qrcode( + "<?php echo ui_get_full_url('mobile/index.php?page=agent&id='.$id_agente); ?>", + "#qr_code_agent_view", + 128, + 128 + ); + } $("#text-agente").prop('readonly', true); }); diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index d4036bd68c..2a3620a504 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -754,7 +754,6 @@ if (check_acl($config['id_user'], 0, 'AW')) { // Create agent button. echo '<div style="text-align: right;">'; echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">'; - html_print_input_hidden('new_agent', 1); html_print_submit_button( __('Create agent'), 'crt-2', diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index c0e6d147c5..58c392664f 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -902,7 +902,6 @@ if (!empty($table->data)) { if (check_acl($config['id_user'], 0, 'AW') || check_acl($config['id_user'], 0, 'AM')) { echo '<div style="text-align: right; float: right;">'; echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">'; - html_print_input_hidden('new_agent', 1); html_print_submit_button(__('Create agent'), 'crt', false, 'class="sub next"'); echo '</form>'; echo '</div>'; @@ -913,7 +912,6 @@ if (!empty($table->data)) { ui_print_info_message([ 'no_close' => true, 'message' => __('There are no defined agents') ]); echo '<div style="text-align: right; float: right;">'; echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">'; - html_print_input_hidden('new_agent', 1); html_print_submit_button(__('Create agent'), 'crt', false, 'class="sub next"'); echo '</form>'; echo '</div>'; From 033dd531a8a6a9c6c68cdf1f68f89893b345b519 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Tue, 20 Oct 2020 17:47:35 +0200 Subject: [PATCH 018/104] Minor fix all group empty label --- pandora_console/include/functions_html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 092044765c..02e31a4754 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -510,7 +510,7 @@ function html_print_select_groups( } } else { foreach ($selected as $k) { - $fields[$k] = groups_get_name($k); + $fields[$k] = groups_get_name($k, $returnAllGroup); } } From 25295f7b0b87d42ffdb75c2889673d15ba4371f7 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Tue, 20 Oct 2020 18:06:05 +0200 Subject: [PATCH 019/104] fixes --- pandora_console/include/functions_html.php | 8 ++++++++ .../lib/Dashboard/Widgets/top_n_events_by_group.php | 7 ++++++- .../lib/Dashboard/Widgets/top_n_events_by_module.php | 7 ++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 02e31a4754..025416ec47 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -510,8 +510,16 @@ function html_print_select_groups( } } else { foreach ($selected as $k) { + if ($k === null || $k === '') { + continue; + } + $fields[$k] = groups_get_name($k, $returnAllGroup); } + + if (empty($fields) === true && $returnAllGroup) { + $fields[0] = groups_get_name(null, true); + } } if (empty($nothing) === false) { diff --git a/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_group.php b/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_group.php index 2acd7f32fa..bd7d7d5886 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_group.php +++ b/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_group.php @@ -278,6 +278,11 @@ class TopNEventByGroupWidget extends Widget ]; // Groups. + $selected_groups = []; + if ($values['groupId']) { + $selected_groups = explode(',', $values['groupId'][0]); + } + $inputs[] = [ 'label' => __('Groups'), 'arguments' => [ @@ -285,7 +290,7 @@ class TopNEventByGroupWidget extends Widget 'name' => 'groupId[]', 'returnAllGroup' => true, 'privilege' => 'AR', - 'selected' => explode(',', $values['groupId'][0]), + 'selected' => $selected_groups, 'return' => true, 'multiple' => true, ], diff --git a/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_module.php b/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_module.php index 4bbaee22a8..148ace6aac 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_module.php +++ b/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_module.php @@ -277,6 +277,11 @@ class TopNEventByModuleWidget extends Widget ], ]; + $selected_groups = []; + if ($values['groupId']) { + $selected_groups = explode(',', $values['groupId'][0]); + } + // Groups. $inputs[] = [ 'label' => __('Groups'), @@ -285,7 +290,7 @@ class TopNEventByModuleWidget extends Widget 'name' => 'groupId[]', 'returnAllGroup' => true, 'privilege' => 'AR', - 'selected' => explode(',', $values['groupId'][0]), + 'selected' => $selected_groups, 'return' => true, 'multiple' => true, ], From 4babcbe647b638ca1a57303606efbc5adc0c8262 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Tue, 20 Oct 2020 18:25:04 +0200 Subject: [PATCH 020/104] Forced recursion while selecting All group - group_alert_report --- .../reporting/reporting_builder.item_editor.php | 14 ++++++++++++++ pandora_console/include/functions_reporting.php | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index db1303d907..dfdc05c1fc 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -3744,6 +3744,19 @@ $(document).ready (function () { $("#combo_group").change ( function () { + + // Alert report group must show all matches when selecting All group + // ignoring 'recursion' option. #6497. + if ($('#type').val() == 'alert_report_group' + && $("#combo_group").val() == 0 + ) { + $('#checkbox-recursion').attr('disabled',true) + $('#checkbox-recursion').attr('checked','checked') + } else { + $('#checkbox-recursion').removeAttr('checked') + $('#checkbox-recursion').removeAttr('disabled') + } + $("#id_agents").html(''); $("#id_agents2").html(''); $("#module").html(''); @@ -3772,6 +3785,7 @@ $(document).ready (function () { ); } ); + $("#combo_group").change(); $("#checkbox-recursion").change ( function () { diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 0bfe96e864..3c5aa9c66b 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3912,7 +3912,7 @@ function reporting_alert_report_group($report, $content) $agent_modules = alerts_get_agent_modules( $content['id_group'], - $content['recursion'] + (((string) $content['id_group'] === '0') ? true : $content['recursion']) ); if (empty($alerts)) { From 42cca865acc2bc82e7201a14d1ba5cf5b258160b Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Wed, 21 Oct 2020 11:38:57 +0200 Subject: [PATCH 021/104] groups_get_children and propagate update --- pandora_console/extensions/agents_modules.php | 2 +- .../godmode/agentes/modificar_agente.php | 2 +- .../agentes/planned_downtime.editor.php | 2 +- .../godmode/massive/massive_delete_alerts.php | 2 +- .../godmode/reporting/map_builder.php | 2 +- .../reporting/visual_console_favorite.php | 2 +- .../include/class/CredentialStore.class.php | 2 +- .../include/class/NetworkMap.class.php | 2 +- pandora_console/include/functions_agents.php | 7 +- pandora_console/include/functions_api.php | 2 +- .../include/functions_custom_fields.php | 2 +- pandora_console/include/functions_events.php | 42 ++---- pandora_console/include/functions_groups.php | 120 ++++-------------- .../include/functions_networkmap.php | 2 +- .../include/functions_reporting.php | 2 +- pandora_console/include/functions_tags.php | 12 +- .../operation/agentes/estado_agente.php | 4 +- .../operation/agentes/ver_agente.php | 14 +- .../operation/events/events.build_query.php | 2 +- 19 files changed, 78 insertions(+), 147 deletions(-) diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 8aa032c9a8..0a3cc2a382 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -668,7 +668,7 @@ function mainAgentsModules() if ($recursion) { $filter_groups['id_grupo'] = array_merge( $group_id, - groups_get_id_recursive($group_id, true) + groups_get_children_ids($group_id, true) ); } else { $filter_groups['id_grupo'] = $group_id; diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index d4036bd68c..8238d1636b 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -408,7 +408,7 @@ if ($ag_group > 0) { $ag_groups = []; $ag_groups = (array) $ag_group; if ($recursion) { - $ag_groups = groups_get_id_recursive($ag_group, true); + $ag_groups = groups_get_children_ids($ag_group, true); } $user_groups_to_sql = implode(',', $ag_groups); diff --git a/pandora_console/godmode/agentes/planned_downtime.editor.php b/pandora_console/godmode/agentes/planned_downtime.editor.php index b3e7029dbd..4aceac701e 100644 --- a/pandora_console/godmode/agentes/planned_downtime.editor.php +++ b/pandora_console/godmode/agentes/planned_downtime.editor.php @@ -877,7 +877,7 @@ if ($id_downtime > 0) { $filter_cond = ''; if ($filter_group > 0) { if ($recursion) { - $rg = groups_get_id_recursive($filter_group, true); + $rg = groups_get_children_ids($filter_group, true); $filter_cond .= ' AND id_grupo IN ('; $i = 0; diff --git a/pandora_console/godmode/massive/massive_delete_alerts.php b/pandora_console/godmode/massive/massive_delete_alerts.php index c9bcda46ba..c5407ed365 100755 --- a/pandora_console/godmode/massive/massive_delete_alerts.php +++ b/pandora_console/godmode/massive/massive_delete_alerts.php @@ -40,7 +40,7 @@ if (is_ajax()) { $keys_prefix = (string) get_parameter('keys_prefix', ''); if ($recursion) { - $groups = groups_get_id_recursive($id_group, true); + $groups = groups_get_children_ids($id_group, true); } else { $groups = [$id_group]; } diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php index 9f8b8f0162..482b995f8f 100644 --- a/pandora_console/godmode/reporting/map_builder.php +++ b/pandora_console/godmode/reporting/map_builder.php @@ -278,7 +278,7 @@ if ($ag_group > 0) { $ag_groups = []; $ag_groups = (array) $ag_group; if ($recursion) { - $ag_groups = groups_get_id_recursive($ag_group, true); + $ag_groups = groups_get_children_ids($ag_group, true); } } diff --git a/pandora_console/godmode/reporting/visual_console_favorite.php b/pandora_console/godmode/reporting/visual_console_favorite.php index b9f4fe28d7..253218431f 100644 --- a/pandora_console/godmode/reporting/visual_console_favorite.php +++ b/pandora_console/godmode/reporting/visual_console_favorite.php @@ -143,7 +143,7 @@ if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'AW')) { $ag_groups = []; $ag_groups = (array) $ag_group; if ($recursion) { - $ag_groups = groups_get_id_recursive($ag_group, true); + $ag_groups = groups_get_children_ids($ag_group, true); } } else if ($own_info['is_admin']) { $returnAllGroups = 1; diff --git a/pandora_console/include/class/CredentialStore.class.php b/pandora_console/include/class/CredentialStore.class.php index 073f0831a3..d14314a6b4 100644 --- a/pandora_console/include/class/CredentialStore.class.php +++ b/pandora_console/include/class/CredentialStore.class.php @@ -248,7 +248,7 @@ class CredentialStore extends Wizard ); } else { $groups = [ $filter['filter_id_group'] ]; - $childrens = groups_get_childrens($id_group, null, true); + $childrens = groups_get_children($id_group, null, true); if (!empty($childrens)) { foreach ($childrens as $child) { $groups[] = (int) $child['id_grupo']; diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index a14e2b80c4..0eaea52134 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -810,7 +810,7 @@ class NetworkMap $filter['id_grupo'] = $this->idGroup; } else { // Show current group and children. - $childrens = groups_get_childrens($this->idGroup, null, true); + $childrens = groups_get_children($this->idGroup, null, true); if (!empty($childrens)) { $childrens = array_keys($childrens); diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index beff278dc1..8ba751042c 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -1108,11 +1108,14 @@ function agents_get_group_agents( foreach ($id_group as $parent) { $id_group = array_merge( $id_group, - groups_get_id_recursive($parent, false) + groups_get_children_ids($parent, $noACL) ); } } else { - $id_group = groups_get_id_recursive($id_group, false); + $id_group = array_merge( + [$id_group], + groups_get_children_ids($id_group, $noACL) + ); } // Check available groups for target user only if asking for 'All' group. diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 6401910faa..863eaf0b3f 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -1973,7 +1973,7 @@ function api_get_all_agents($thrash1, $thrash2, $other, $returnType) $ag_groups = $other['data'][1]; // Recursion. if ($other['data'][6] === '1') { - $ag_groups = groups_get_id_recursive($ag_groups, true); + $ag_groups = groups_get_children_ids($ag_groups, true); } $ag_groups = implode(',', (array) $ag_groups); diff --git a/pandora_console/include/functions_custom_fields.php b/pandora_console/include/functions_custom_fields.php index d1f661e874..c15b0cae95 100644 --- a/pandora_console/include/functions_custom_fields.php +++ b/pandora_console/include/functions_custom_fields.php @@ -367,7 +367,7 @@ function agent_counters_custom_fields($filters) if ($filters['group']) { // Recursion check acl. if ($filters['recursion']) { - $recursion_groups = groups_get_id_recursive($filters['group'], true); + $recursion_groups = groups_get_children_ids($filters['group'], true); if (!users_can_manage_group_all('AR')) { if (isset($user_groups) && is_array($user_groups)) { $groups_intersect = array_intersect($user_groups, $recursion_groups); diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 7a337fbdab..cf486b8acf 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -871,37 +871,23 @@ function events_get_all( } $groups = $filter['id_group_filter']; - if (isset($groups) && $groups > 0) { - $propagate = db_get_value( - 'propagate', - 'tgrupo', - 'id_grupo', - $groups - ); + if (isset($groups) === true && $groups > 0) { + $children = groups_get_children($groups); - if (!$propagate && isset($groups)) { - $sql_filters[] = sprintf( - ' AND (te.id_grupo = %d OR tasg.id_group = %d)', - $groups, - $groups - ); - } else { - $children = groups_get_children($groups); - $_groups = [ $groups ]; - if (!empty($children)) { - foreach ($children as $child) { - $_groups[] = (int) $child['id_grupo']; - } + $_groups = [ $groups ]; + if (empty($children) === false) { + foreach ($children as $child) { + $_groups[] = (int) $child['id_grupo']; } - - $groups = $_groups; - - $sql_filters[] = sprintf( - ' AND (te.id_grupo IN (%s) OR tasg.id_group IN (%s))', - join(',', $groups), - join(',', $groups) - ); } + + $groups = $_groups; + + $sql_filters[] = sprintf( + ' AND (te.id_grupo IN (%s) OR tasg.id_group IN (%s))', + join(',', $groups), + join(',', $groups) + ); } // Skip system messages if user is not PM. diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index b6c1a5e6c9..7b733b9c8d 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -265,49 +265,21 @@ function groups_check_used($idGroup) } -/** - * Return a array of id_group of childrens (to branches down) - * - * @param integer $parent The id_group parent to search the childrens. - * @param array $groups The groups, its for optimize the querys to DB. - */ -function groups_get_childrens_ids($parent, $groups=null) -{ - if (empty($groups)) { - $groups = db_get_all_rows_in_table('tgrupo'); - } - - $return = ''; - - foreach ($groups as $key => $group) { - if ($group['id_grupo'] == 0) { - continue; - } - - if ($group['parent'] == $parent) { - $return .= $group['id_grupo'].','; - $propagate = db_get_value('propagate', 'tgrupo', 'id_grupo', $group['id_grupo']); - if ($propagate) { - $return .= groups_get_childrens_ids($group['id_grupo']); - } - } - } - - return $return; -} - - /** * Return a array of id_group of children of given parent. * * @param integer $parent The id_grupo parent to search its children. * @param array $ignorePropagate Ignore propagate. + * @param string $privilege Default privilege. + * + * @return array Of Groups, children of $parent. */ -function groups_get_children($parent, $ignorePropagate=false) +function groups_get_children($parent, $ignorePropagate=false, $privilege='AR') { static $groups; + static $user_groups; - if (empty($groups)) { + if (empty($groups) === true) { $aux_groups = []; $groups = db_get_all_rows_in_table('tgrupo'); foreach ($groups as $key => $value) { @@ -317,13 +289,29 @@ function groups_get_children($parent, $ignorePropagate=false) $groups = $aux_groups; } + if (empty($user_groups) === true) { + $user_groups = users_get_groups(false, $privilege, true); + } + + // Admin see always all groups. + $ignorePropagate = users_is_admin() || $ignorePropagate; + $return = []; foreach ($groups as $key => $g) { if ($g['id_grupo'] == 0) { continue; } - if ($ignorePropagate || $parent == 0 || $groups[$parent]['propagate']) { + // IgnorePropagate will be true if user can access child. + $allowed = $ignorePropagate || array_key_exists( + $g['id_grupo'], + $user_groups + ); + + if ($allowed === true + || (int) $parent === 0 + || (bool) $groups[$parent]['propagate'] === true + ) { if ($g['parent'] == $parent) { $return += [$g['id_grupo'] => $g]; if ($g['propagate'] || $ignorePropagate) { @@ -340,38 +328,6 @@ function groups_get_children($parent, $ignorePropagate=false) } -/** - * @deprecated This is not working. Expects 'propagate' on CHILD not on PARENT!!! - * - * Return a array of id_group of childrens (to branches down) - * - * @param integer $parent The id_group parent to search the childrens. - * @param array $groups The groups, its for optimize the querys to DB. - */ -function groups_get_childrens($parent, $groups=null, $onlyPropagate=false) -{ - if (empty($groups)) { - $groups = db_get_all_rows_in_table('tgrupo'); - } - - $return = []; - - foreach ($groups as $key => $group) { - if ($group['id_grupo'] == 0) { - continue; - } - - if ($group['propagate'] || $onlyPropagate) { - if ($group['parent'] == $parent) { - $return = ($return + [$group['id_grupo'] => $group] + groups_get_childrens($group['id_grupo'], $groups, $onlyPropagate)); - } - } - } - - return $return; -} - - /** * Return a array of id_group of parents (to roots up). * @@ -541,35 +497,11 @@ function groups_get_all($groupWithAgents=false) * * @return array with all result groups */ -function groups_get_id_recursive($id_parent, $all=false) +function groups_get_children_ids($id_parent, $all=false) { - $return = []; + $return = groups_get_children($id_parent, $all); - $return = array_merge($return, [$id_parent]); - - // Check propagate - $propagate = db_get_value_filter('propagate', 'tgrupo', ['id_grupo' => $id_parent]); - - if (($propagate == 1) || $all) { - $children = db_get_all_rows_filter('tgrupo', ['parent' => $id_parent, 'disabled' => 0], ['id_grupo']); - - if ($children === false) { - $children = []; - } else { - $temp = []; - foreach ($children as $id_children) { - $temp = array_merge($temp, [$id_children['id_grupo']]); - } - - $children = $temp; - } - - foreach ($children as $id_children) { - $return = array_merge($return, groups_get_id_recursive($id_children, $all)); - } - } - - return $return; + return array_keys($return); } diff --git a/pandora_console/include/functions_networkmap.php b/pandora_console/include/functions_networkmap.php index 56172331c6..bd5152576d 100644 --- a/pandora_console/include/functions_networkmap.php +++ b/pandora_console/include/functions_networkmap.php @@ -319,7 +319,7 @@ function networkmap_generate_dot( if ($dont_show_subgroups) { $filter['id_grupo'] = $group; } else { - $childrens = groups_get_childrens($group, null, true); + $childrens = groups_get_children($group, null, true); if (!empty($childrens)) { $childrens = array_keys($childrens); diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 0bfe96e864..c480969f16 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -9072,7 +9072,7 @@ function reporting_get_group_stats($id_group=0, $access='AR') $covered_groups = []; $group_array = []; foreach ($id_group as $group) { - $children = groups_get_childrens($group); + $children = groups_get_children($group); // Show empty groups only if they have children with agents // $group_array = array(); diff --git a/pandora_console/include/functions_tags.php b/pandora_console/include/functions_tags.php index 5aace86006..fe36bc34fa 100644 --- a/pandora_console/include/functions_tags.php +++ b/pandora_console/include/functions_tags.php @@ -941,7 +941,7 @@ function tags_get_acl_tags_event_condition( } // Group condition (The module belongs to an agent of the group X) - // $group_condition = sprintf('id_grupo IN (%s)', implode(',', array_values(groups_get_id_recursive($group_id, true))));. + // $group_condition = sprintf('id_grupo IN (%s)', implode(',', array_values(groups_get_children_ids($group_id, true))));. $group_condition = '('.$id_grupo_table_pretag.'id_grupo = '.$group_id.' OR '.$alt_id_grupo_table_pretag.'id_group = '.$group_id.')'; // Tags condition (The module has at least one of the restricted tags). @@ -1350,7 +1350,7 @@ function tags_checks_event_acl($id_user, $id_group, $access, $tags=[], $children foreach ($user_tags as $user_tag) { $tags_user = $user_tag['tags']; $id_group_user = $user_tag['id_grupo']; - $childrens = groups_get_childrens($id_group_user, null, true); + $childrens = groups_get_children($id_group_user, null, true); if (empty($childrens)) { $group_ids = $id_group_user; @@ -1421,7 +1421,7 @@ function tags_get_agents_counter($id_tag, $groups_and_tags=[], $agent_filter=[], $tags_arr = explode(',', $tags); foreach ($tags_arr as $tag) { if ($tag == $id_tag) { - $hierarchy_groups = groups_get_id_recursive($group_id); + $hierarchy_groups = groups_get_children_ids($group_id); $groups_id = array_merge($groups_id, $hierarchy_groups); } } @@ -1923,7 +1923,7 @@ function tags_get_monitors_counter($id_tag, $groups_and_tags=[], $agent_filter=[ $tags_arr = explode(',', $tags); foreach ($tags_arr as $tag) { if ($tag == $id_tag) { - $hierarchy_groups = groups_get_id_recursive($group_id); + $hierarchy_groups = groups_get_children_ids($group_id); $groups_id = array_merge($groups_id, $hierarchy_groups); } } @@ -2219,7 +2219,7 @@ function tags_monitors_fired_alerts($id_tag, $groups_and_tags=[], $id_agente=fal $tags_arr = explode(',', $tags); foreach ($tags_arr as $tag) { if ($tag == $id_tag) { - $hierarchy_groups = groups_get_id_recursive($group_id); + $hierarchy_groups = groups_get_children_ids($group_id); $groups_id = array_merge($groups_id, $hierarchy_groups); } } @@ -2283,7 +2283,7 @@ function tags_get_monitors_alerts($id_tag, $groups_and_tags=[], $id_agente=false $tags_arr = explode(',', $tags); foreach ($tags_arr as $tag) { if ($tag == $id_tag) { - $hierarchy_groups = groups_get_id_recursive($group_id); + $hierarchy_groups = groups_get_children_ids($group_id); $groups_id = array_merge($groups_id, $hierarchy_groups); } } diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index c0e6d147c5..8144ea524a 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -546,7 +546,7 @@ if (!empty($search_custom)) { if ($group_id > 0) { $groups = [$group_id]; if ($recursion) { - $groups = groups_get_id_recursive($group_id, true); + $groups = groups_get_children_ids($group_id, true); } } else { $groups = []; @@ -576,7 +576,7 @@ if ($strict_user) { if ($group_id > 0) { $groups = [$group_id]; if ($recursion) { - $groups = groups_get_id_recursive($group_id, true); + $groups = groups_get_children_ids($group_id, true); } $filter['id_group'] = implode(',', $groups); diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index e86960938a..eb4a5186bf 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -146,14 +146,24 @@ if (is_ajax()) { // Perform search. $agents = agents_get_group_agents( + // Id_group. $id_group, + // Search. $filter, + // Case. 'lower', - false, + // NoACL. + true, + // ChildGroups. $recursion, + // Serialized. false, + // Separator. '|', - $cluster_mode + // Add_alert_bulk_op. + $cluster_mode, + // Force_serialized. + false ); if (empty($agents)) { diff --git a/pandora_console/operation/events/events.build_query.php b/pandora_console/operation/events/events.build_query.php index b1b4051e7f..0f68cbfb5f 100755 --- a/pandora_console/operation/events/events.build_query.php +++ b/pandora_console/operation/events/events.build_query.php @@ -28,7 +28,7 @@ if ($id_group > 0) { if ($propagate) { $childrens_ids = [$id_group]; - $childrens = groups_get_childrens($id_group, null, true); + $childrens = groups_get_children($id_group, null, true); if (!empty($childrens)) { foreach ($childrens as $child) { From 6b25ae60044827fc5d40399f1b91d62a34d9fa3b Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Wed, 21 Oct 2020 13:23:17 +0200 Subject: [PATCH 022/104] improved agent_module report (CSV) --- pandora_console/include/functions.php | 67 +++++++++++++++++++ pandora_console/include/functions_agents.php | 19 +++--- .../operation/agentes/ver_agente.php | 2 +- 3 files changed, 78 insertions(+), 10 deletions(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 0147168ebf..b14ad3e7b2 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1342,6 +1342,73 @@ function get_priority_name($priority) } +/** + * Translates status into string. + * + * @param integer $status Agent status. + * + * @return string Translation. + */ +function get_agent_status_string($status) +{ + switch ($status) { + case AGENT_STATUS_CRITICAL: + return __('CRITICAL'); + + case AGENT_STATUS_WARNING: + return __('WARNING'); + + case AGENT_STATUS_ALERT_FIRED: + return __('ALERT FIRED'); + + case AGENT_STATUS_NOT_INIT: + return __('NO DATA'); + + case AGENT_STATUS_NORMAL: + return __('NORMAL'); + + case AGENT_STATUS_UNKNOWN: + default: + return __('UNKNOWN'); + } +} + + +/** + * Translates status into string. + * + * @param integer $status Module status. + * + * @return string Translation. + */ +function get_module_status_string($status) +{ + switch ($status) { + case AGENT_MODULE_STATUS_CRITICAL_BAD: + return __('CRITICAL'); + + case AGENT_MODULE_STATUS_WARNING_ALERT: + case AGENT_MODULE_STATUS_CRITICAL_ALERT: + return __('ALERT FIRED'); + + case AGENT_MODULE_STATUS_WARNING: + return __('WARNING'); + + case AGENT_MODULE_STATUS_UNKNOWN: + return __('UNKNOWN'); + + case AGENT_MODULE_STATUS_NO_DATA: + case AGENT_MODULE_STATUS_NOT_INIT: + return __('NO DATA'); + + case AGENT_MODULE_STATUS_NORMAL_ALERT: + case AGENT_MODULE_STATUS_NORMAL: + default: + return __('NORMAL'); + } +} + + /** * Get priority class (CSS class) from priority value. * diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 8ba751042c..8bad693c3d 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -19,17 +19,18 @@ require_once $config['homedir'].'/include/functions.php'; require_once $config['homedir'].'/include/functions_modules.php'; -require_once $config['homedir'].'/include/functions_users.php';/** - * Return the agent if exists in the DB. - * - * @param integer $id_agent The agent id. - * @param boolean $show_disabled Show the agent found althought it is disabled. By default false. - * @param boolean $force_meta - * - * @return boolean The result to check if the agent is in the DB. - */ +require_once $config['homedir'].'/include/functions_users.php'; +/** + * Return the agent if exists in the DB. + * + * @param integer $id_agent The agent id. + * @param boolean $show_disabled Show the agent found althought it is disabled. By default false. + * @param boolean $force_meta + * + * @return boolean The result to check if the agent is in the DB. + */ function agents_get_agent($id_agent, $show_disabled=true, $force_meta=false) { $agent = db_get_row_filter( diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index eb4a5186bf..df5146711c 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -88,7 +88,7 @@ if (is_ajax()) { if ($get_agents_group_json) { $id_group = (int) get_parameter('id_group'); - $recursion = (bool) get_parameter('recursion'); + $recursion = (get_parameter_switch('recursion', 'false') === 'true'); $id_os = get_parameter('id_os', ''); $agent_name = get_parameter('name', ''); From bfa5b81ee804dafa68da27c732646788b1dee424 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Wed, 21 Oct 2020 14:03:46 +0200 Subject: [PATCH 023/104] Added server component status - crash - --- .../godmode/servers/servers.build_table.php | 12 +++++++++++- pandora_console/include/constants.php | 3 ++- pandora_console/include/functions_modules.php | 2 ++ pandora_console/include/functions_ui.php | 4 ++++ pandora_server/bin/pandora_server | 2 +- 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index 668ef26f0c..169789d81c 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -92,7 +92,17 @@ foreach ($servers as $server) { // Status $data[1] = ui_print_status_image(STATUS_SERVER_OK, '', true); if (($server['status'] == 0) || (($date - time_w_fixed_tz($server['keepalive'])) > ($server['server_keepalive']) * 2)) { - $data[1] = ui_print_status_image(STATUS_SERVER_DOWN, '', true); + $data[1] = ui_print_status_image( + STATUS_SERVER_DOWN, + __('Server is stopped.'), + true + ); + } else if ($server['status'] == -1) { + $data[1] = ui_print_status_image( + STATUS_SERVER_CRASH, + __('Server has crashed.'), + true + ); } // Type diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index d32dacb1fe..258b6e805c 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -309,7 +309,7 @@ define('STATUS_ALERT_DISABLED', 'alert_disabled.png'); // For servers. define('STATUS_SERVER_OK', 'server_ok.png'); define('STATUS_SERVER_DOWN', 'server_down.png'); - +define('STATUS_SERVER_CRASH', 'server_crash.png'); // Status images (ball). @@ -335,6 +335,7 @@ define('STATUS_ALERT_DISABLED_BALL', 'alert_disabled_ball.png'); // For servers. define('STATUS_SERVER_OK_BALL', 'server_ok_ball.png'); define('STATUS_SERVER_DOWN_BALL', 'server_down_ball.png'); +define('STATUS_SERVER_CRASH_BALL', 'server_crash_ball.png'); diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 9a5ea93f92..e28c255f9c 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -2494,6 +2494,8 @@ function modules_get_color_status($status, $force_module=false) case STATUS_AGENT_CRITICAL: case STATUS_MODULE_CRITICAL_BALL: case STATUS_AGENT_CRITICAL_BALL: + case STATUS_SERVER_CRASH: + case STATUS_SERVER_CRASH_BALL: return COL_CRITICAL; case AGENT_MODULE_STATUS_WARNING: diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index ab6079fb36..65e6facc93 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2762,6 +2762,7 @@ function get_shape_status_set($type) // Small squares. case STATUS_SERVER_OK: case STATUS_SERVER_DOWN: + case STATUS_SERVER_CRASH: $return = ['class' => 'status_small_squares']; break; @@ -2773,6 +2774,9 @@ function get_shape_status_set($type) case STATUS_AGENT_OK_BALL: case STATUS_AGENT_NO_DATA_BALL: case STATUS_AGENT_NO_MONITORS_BALL: + case STATUS_SERVER_OK_BALL: + case STATUS_SERVER_DOWN_BALL: + case STATUS_SERVER_CRASH_BALL: $return = ['class' => 'status_balls']; break; diff --git a/pandora_server/bin/pandora_server b/pandora_server/bin/pandora_server index 812bf1e57b..d82944f93b 100755 --- a/pandora_server/bin/pandora_server +++ b/pandora_server/bin/pandora_server @@ -771,7 +771,7 @@ sub main() { die("Server thread crashed.") unless (check_server_threads() == 1); db_do ($DBH, - "UPDATE tserver SET status = 0 + "UPDATE tserver SET status = -1 WHERE UNIX_TIMESTAMP(now())-UNIX_TIMESTAMP(keepalive) > 2*server_keepalive" ); From 6f498d6d5dca5a96b69633dc10350bb8572da463 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Wed, 21 Oct 2020 14:04:45 +0200 Subject: [PATCH 024/104] server status images --- .../images/status_sets/default/server_crash.png | Bin 0 -> 5300 bytes .../status_sets/default/server_crash_ball.png | Bin 0 -> 6783 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 pandora_console/images/status_sets/default/server_crash.png create mode 100644 pandora_console/images/status_sets/default/server_crash_ball.png diff --git a/pandora_console/images/status_sets/default/server_crash.png b/pandora_console/images/status_sets/default/server_crash.png new file mode 100644 index 0000000000000000000000000000000000000000..5bee46f76cecb376a3e1625415201c629ae4f95f GIT binary patch literal 5300 zcmeHLX;c(f7A_P7QN-YAaETTTsHjC%Z_wS+?2UA=0UJaR6|1YNp`<sf3TR{!MZvh^ z5=D`SMm!N6ml-uEt{60E;)*&(jSJ!k<Gv*3NW^*7Ahd~N#&ahBgwsvG`@Z|#`@VPY zdtJ<pj~(Ua+Rqh&AUAb%q!#?`&c9r`fcK=V3AZ7r(@)b9lQ}J(16vrgo;FZ0musP5 z%1Y}Y$a?8saq8A9aQE5QQdGq~FMF=OWm#S|%l}}A&$2c0;!WCSEj_bSjaSIgvIza* zUmkrj+bkQJ>N@5`LTuBa57_S~oPKmO==j#AIeUYPvUfc-xIc57tv-D`x2dV$%k6cD zCBRAfiFZSB&-1tY%O^c=iES*2UNLGx?7@P^zCM4wx;AEQ>30fkcHZ6s#mS$iwRE4g zZNoZ`%a<x^o9|@InKaI`FxTZ+eo0}RGg%gPyehxM=|*VU>2d0fs>ipwc6yvrx+ri` zp?l&$<@3WWJ?53y4V-N4p|83ecdxw6Ipl87gR4?5DW5F+@#&g+zuG&cJMvbtrJIKf zy~>-$pCkPCewN?ctN2B7xUh8IfqP5G1i^Xz8#y1nivE1=2QSo16unC%*_Ss~AE}+? zhOnJiQ>^ghl|Is?yInN_$Ic$9-sZ6F(D6!i=j{`DRZ)xPj>LU>)nsf4Pd<NeXqxMZ zJ=!&m4@V|FoIlRv@Isa8yr&Z^8I)T-@=(#^mgEUej#;1m@b^Q^xr8r=P298VadbdN zb*L)uKp*mjN9Y`^@^D{|o-&WQ+AqIZxzJ@Q_t38=v!b@QOZ4)Q`x=HWg}%)_u`qqX z&&f%_Cob-Qbo-;aNK#yrRR%-tp!tgi3>(&OthAyc^TJY}BjtX+F_}+>5ALHuR;^0? zy1xF*`DLr~9^Un3`xq9LBz%2Wep`#t`Al`4Q|FH>CTuvmNji4(Bo=XNs?*i2D3Q7& zm1p<Fd>ecwq4K`+nJ5EZ9yLI5cKZ$QBGHm53Hnk+-OeWQDJEgPMfW1UrL>=N<D<d5 zx?Iw@6_qG`GK@p2R_1$->NGXgaq;PWD?f@AGRcj7c6f`gx>DAPZn0mfx;x&4FQ^0e zrZueDUFi98UjLBV!ovG$i@SCE@xz8-rnz7|+PvNm?=^ng4cC8rSzm05-0+iwzQ6p; zf#kH$uT|cNb3RZoDI8r_d^)Dl_o>How9ruR?AYQtyR7DJ*u{T@ud09`hXOhxB3>O4 z@u~qp*_VE@L>c`}=zt?>sT;JzdnEOoS{whxh&l7PbHo0!E_`F}@mbiOr`<{<K7Rg- zW@c7b7aiF&YyOU{J+{t-e{ra9Xe@6O__m;aJLf#QzI)Jv`^x)Q9a^FaEA;<#TsvjO zlGwoo2GdxV1A>CEr-B~Q-=Di3DResZD9e3N+5=tCcg<JI*2f)N-Th(LnjND9N7TF3 zuhPWa-WN9j_f>lZ4;dKPIJ2f`Lh-~;Z%*JYo)UXU4OYet@ai+~qY*jS@V>(yNv0-_ zksg1RJ~2sVo|-gVdZB8_bX>M=%Lw+1f4MA8uJMR;Sv)49Z|~$eXErU-2{g@J-Cu6M z`Qb6&Wt+Q4Epkd+7tZ{8efq<_sXH)f)8N8hq0i<Ur!VMKJ#lSH<-G^QWz!lcKmGd0 zna!Ks;1>0?{aaK;Gg^$->#MdL%R6+d2lli)W_ClgLrF`xgEeHm`M5*p%Fv7x_qOaR zs&j@TCT=jzm=!VkZ_z*88TjCS)7^X5#9LZEh0+M7?BopfQ3!IMPlE#~Su<Ken2r88 zY1UExR-*+RSP&ExVzuBzCdI)zDxEed1rPQf6u>m86pWK<FpVXG%AljCF;v2|*hFGl zCLt#UA;GReRs|q1QXCFjjRq5|uqp*MUIqBfn^6I5gK(KjL9!+ujxaM6Eb*84V~EO1 zXNv^Eu5b`T>J{3^s5S~PQVKFS&Z0okoSYp09I?NdNk@fpxg5nrs7QnW1j6Q;INXYu zSZ|)9l_Qd335K?CwAlpnoVd=M#VG{>Fb}tpgIPjl1;(}j{Mbg%awMt-0|{6U0H7ia zlOdQ05y??|e=w`jw0oP_HWh)Ms1>)MLVpZ38ej8ZIaPK?yf=EViQry9wG?a4VhBo= zO_?}v`=Ay>7Hc0fi=}vzEpG#<M?q4y$o4*?)SCEqA6~|E+Gw$P@MwD^NwniES&YGk zAqkW+P)3jl3z&tk;W=90u|cn`hoAXfA|PBl|7+-1df9TZ>8gk{6Ipyvb)-_j=c^#i z1WhVzA9YeOp~C|(gc3@1h(t_ch&+HK5i$^$P*@-(6j3reDz%B_a1%lCRDj%{20S9Y zoWv-h454t0L?k+i2$2U80SHOx<&;>5%W!#s9Yq{NgHFH=_F3^%B%s1@9WD+aq=+2T zi4X}!h!B~G5F;`PMuIuHR4mllsQ7(QgvG0s0+Bz~VTm{3oZieBm4eZ<Da+b1kw_b< z1P<p#69!;nkxVGTFu6=7m)m(KQ49-;oaYo`{vwghog@@dfDs49MjP>T3bmNhZ4>;q zD8OQXusGivfZ1jTYf(fn6waBMM6=nT6!5viJf*Fr;Gni<QH(YdHb)znBKdx6>$q?{ z9kmUE(6@nq$CQv^&N2OOJRQ(>mN16PF*BKQOq^~CMR0HDc@wyuNej+8mSb|&f3T?E z;DTDqH5&MunOwX03DnfqQR{(ZplwpYu<Z~~;6$tZES^n~wk-fUwoVZlxG9|ir)^uS zy|UA9C}WunCn+H=0d*^rA`-crLU24lhKOaLwgYgA5|XW*(9X`9^;{0lP+{qy2Eaap z*0Sw0Jk(Zwey`_}lR<$R8IFk*7$#`lUN{Kl57bx73*wI)jYeTFKoEZ<Db#%BC1hDF z2AX1C7v@!={1=>^e_K)hk-I&t)jPs$$puZD!Nuj6-WvW5z*dIQG(nkI^V?FlhqTIK zckh6lTW#Pz1J@(kem}OA1>ZS;;!j(-{fQ9(_4^?2r0;vV-pln)3cM5eeRaK;>zx#M zC-D2~`oGEL+VO-<nZOsl9Ps>{I<5lzD-i0Uiy0LOz2tw_?*D2TuynOVr?3#ztr!1t zfJ#a|fzg>$YgEn+uD!d-hK6^oya-Hv)sbO|Lr)RE4!ZHAEZ^}^O{l>0Jf@XEkoUn( URgx=90RaT5Rk4v<!za)D4`jThH~;_u literal 0 HcmV?d00001 diff --git a/pandora_console/images/status_sets/default/server_crash_ball.png b/pandora_console/images/status_sets/default/server_crash_ball.png new file mode 100644 index 0000000000000000000000000000000000000000..fea84fee554f1989c918ffbff407e912183784af GIT binary patch literal 6783 zcmeHLc{r478y_WGktL-pP2)&n%wjMz$6y%CSRz}pq*>k>gIUas3>DJRq9SsTHlj~t zJL#kp?TaErmQYfn1>>}7<9lbQ^nIPauj~50{~Fiexu4(td!GCE-1q&w*Sp<wg_E+< zA|(g}qD*!sd4YfDNWKbk;BUXEpaBR(zBAUxU+6`NhVuAa1}g%93S)Qx6cDi(5QymR zkbmIuN6S<`GBqn@cSA1lMb2uKn^%wPY<f{!%<*toHQ`1&qQ9%<s@<SY4SFzsoc$nV zjF+LsPxD(}s&=SbP`GKw{1N7ULGs)EBTNGA-3FVp1ZX#P=Z5%`@9N`wJh(H4kvv~( zg|O6IjE&9U+qC<&3WtBK2!GW6UafU8(d`W}R(9u^QvdaPQUkMNuMK<*-|{%{l2KJ- z*n~K6ZB1~6iiVM43Ra`VH=)r|ESAS=T+%tk2wG4!uwRdYyx#bHo=vD`oNa&9@3p5V zX3Z;m6L)@B<JA)GLywWdzxu7u^+s#N`|oY<x^ZZ@@m0ms9cdrKPX;1e&YVdzb_+P< zUUQOPhK#)UXv3OgSlRoD;W(#j%`@6oCv4c9t#QqTpjN^)Dm>tLynq?RB3^NGNlXis z(LUGif3$_)s?M}YPvZ?VD38I<-#q2YtuCnK*xW2_tq`xsCM#Y{_g*sg<Pf%2lm0lv z!|0@CAQ8b=w^Mey)tEiYHoZpVld>t~T6^ll8@3fXW|k4W%P|i1>3SSo>KLRU+aI|m z#P#@M8Khd9spnFZ>NfL8vbn>O^o+IF<Tl93n)kVBs1|sI+PmJU*X+go_2+0xfmxPP zPuI59kc&Oe5cdI@67&r1G5yn<?DKhbM=}BmPTanEG)Msd)2~SH!<GuVk(WaOIji|p zzh40Rc0g#&t`!H=bX?1WW1rQeZgP<SW$sx5lCqP$hj|caGpcN`zBXf{-x}bK!Lg(} z?Hwm#^jAEu2C91AG!^8gGvEQfCs^&2+?+oEV?Xzj)m5Wg0+bfCElvq>g4cNFZ_e<@ zuxu3<Uw0+_#q-iJgF515A|qvOL;3YoSDZI*P^Yp(am`AFfcf%FL#H_k40j)s8p@lL zZo_W7Tj!FrYj)38>9N@q#2c(74m)+nCEnFDWbv^Ir?snB>R<YZBzEOmSQQZ-b^~Eg z6N=r{#+Luau2d^hP~W+8AswZ?W~8Y2_>)$`N6TLAfK{W<PKjZZochD;C)KkTn(xD< zRO*O?i1F9g*$X2UZE!d|6m}llapGjCgUq26wzJ?Lr|XTZxgA!EV93FseCnkgmvedh zC>P=atCXu<>(h4K+x2261hzs}ag1z&x2&j#ia3NQ(%SPwqYACv@S>MK>*fVQV%k~f z!%UXZkq4e_>J=y_XFbUl7(Snwq3aix5MLIgRzS53=#(q3J2Br_z52;NR<@EXUOqQ1 z`+Yf$hU+@AogLWmr+O0Zn1fh0sExiaOs1bvC_Bq{Y;4hzo?Xp8`C=FQ3j=va9!5Pl zzI2ph%!4lrI`83mOx%6)h54KlH*GqezDIp{C3{70d3SY$NS%2~-729sC_@k;Zk)AQ zzd<<^lQz67)FQjLP%Z(>54&{#HTM1X4v&k0vsE5-)pf4ZGC1^6CvZF|S0$%ziLGof zB);=l{)y1cfYdsgMN=JNC}|_6$+N0uG>_VVSpIlxa^OIAvnnbxS$ol%RNYd@el@=C zK<y?$=R)6}KU9M}u9VKoJS*c7*RS+`aQVQ@xXQKV18<7TV-H$u=im*_G%jkjZF_#4 zm^{ph)Z}cF$uyQFcF|m_X1v}X0d3oM@qUGCu>hNwUDLg{)!V+c&HPljNg^cWc7cqX zVu_}xKc&w`InuH7QS-pP(t;o_mM&+5Y1;hS#g`^>#0}eca<fac>+tM|hK(c8J*&IR zX8vN*)gzad-q$VG8mn(oQMVWa>T~nji+|BLn|@27&nQ$^u}g66_S26IQEf?D?CV;} zMq<*^nd|4us}>E&00F;p&gK^EW!`1VWmpLy&kk%}IK$6xs7GsoGuFG^hvq+e*;Fg| z&8tGOtKQq$4;K^TWk0IDbZVN&hrW8W&$FgV!)Y~lzD0AxLFmAk_=EM8hc8-R7#}CR zdQj9Tr?hz9TIbA*&Y4GXS@k>bx-^&3-rZ1qJ5$##wJSWc(A2~rU)@lMeAQ;GU+osI z>6&-I=qS>YqMu{TcNEWyZ0RQ(_Wur7G&&M<vi@8q{L=lp6dSthNwwCBVWUO&p6Q*i zZQ7Vum;8GZ`hK<ilffcr+7?pY@fdBva!q4m&*jk0rg|uMWk_4IFzQ)P;k^Lp+zZ3E zUr)^T6vs0BI$tFmK1!fe&fD#N&MN7{KvC7iny4Pq>OpcwrT)sptmagMxF(=*i1;+= z;JvZ6Eq7lRwcK77x*-{JO|%RWj}U1c)jv}1E71F6YhiC)NBrgS#V$PuXBHIip5vlR zAQpM|6nck6#ucw;l)p<nko>@CB!89uwak&f^jKRDzxJG0n!Sqd<WQco{tm?at<k=$ zRVJeu4HcZ|`E8v&eH#rPbeHhEZI|S&VjN5V10S2FmRhdn^7vy{aNwK~%g3mgFwLIM zmMm45lJ1wU4eD-QU-vHkEyp*uM77rJ*n+p5J2R-=u!-YJSGe~JuiD5FZpjCT^7_Z4 z-#H=DAH=_=wms=wM<8_7`Ysa9s;+<AvA1OR8sn{RE{d~p(RU)wdYY*?`PQTgel?s~ zfAj3)b4lgcE`t}|_qJBO8{aqHy*>6<q3WxbgX8gU1GC1T8ikKF<;M>;g?z+yyx6#P zT(MfLt&6|d#cpg~=PXvywf+#C8u#nVL$3xx?!FKov5~hpvvp#|jiIGk{nX(x2t?*L zmc6|v+1~!sB@bTh`!}W$oG;nxTnPz0;$^Jjry6<P^MJ{=WMS*_d3kn6H3OoMr(e#_ z!Te%mnvxiP;X>+_;>|lM%T&q|p<^<Aj|K|{VFu#}qZ8XkdrvJM872(hlNonRDq^(D z=7wdatyub71jkpQ7WNzQB}~P+zIA|vn$<WOHFt5y2-WK5`|d;e9(DWXh!rnax>=g^ zDfjJlcO5wEp+hksFR?b%vm8vkoEnrB9QQCt*wJXF@3@rUp|fOuvaU%q(s<$WQB0)I zO7k0Un8AKnZls^Fd0Vw%JOx``Y9cuBSRvj2vN}m&_e%SPn*Q6Gi_@qu_xFl(Cn_E; zs597eY>s2fET23({)gUp@tMF%r1_JjNgB3qcCh1j&bSbqySi#<gx1A52-(E!bqRle zOc^>(j;$$mNKF`L_x4qn)~!F^uY!D8;JW3JvrNvoos7sPpL;`QW|eJd!%*p;sV(wQ z``{y-gw6JAOPo8O>5U9Oc|LUCtaLmM5<=r2x|Kk_3W2Elv%rTge|I-LjmtKr(79B= zRK(_i4`mRDm5qo;p@joNC>3C`I0V?pnR75Gi%x*8GIvM1^X!38mUAp0@Qz*KLyHZk z;pi|MYb7fY9wcA`LJCyGj^GIJA_7dxiwFOgm=Q3j6e0{K!2I1kq4r!p0L7SMOp$O0 z5o;Y9W~~IZ;?o&;FOuUF1vnzWLWM#e9)XCCjy8=pGv)G`2ow&7Lm<%zG#U;f;DQ*A zkRpO}1o{$+Ne&Vqpz&EeA&bj_N;oN0Zj_J!gMstVDROX@<{$!%QwvDOQhI@qjv#{r z3>XgxK%kLGEF6i3qj8Ao{@|>;`)6;CU`j<$PlSlVL!eBN2sZmG4}s8O-Iw*g=^^j| zpM4QtfPfptrvVP@0FF?9`l14%7w|=s|AGR9e?`EHh!RZSbd&&)n52P6&>09YD(Tjz zFX}{g_x$W5IR_?-&69da(9@B0+GiXuiXS1x&}j%D0$_uY2ta1kS9l?d@i);(X8vs> z;Bue&zZtu9FVcg-len}f$)aQu0R~!3=`1>)h$PyR>@1LW7Ut$ClmnWGa<sI!BRS&i z%#j#7jNLSMGDje!aA?3McNXZ5!!dAx8Px(#rJxva42nX5<1iK&IM&j_(j1KeFjRAk zX%rrO7Fa%%h;QwLPN5>v6b2HGMlsNE3>JfeQ|VYLoQ9@j=_o3dhBU)TsU+ItiJoKv z3~h@1V)2Zi2pL>Hn*eiTaiT<DCVW_Iz*|U>2!*mhnxU~M3<_<5!<l1IUqF5UUjSBy zgcF4{MWdxNbQ<0fWTb!@%3@QP0D{M1N+%>ofd_*D#iU3I3S^erK~?ege1Ib4@_o46 z2m(y9SEz(iT8B`psS3lpacNRVDHxzjigc<>?I=uybZCY69{AswyhFLsod1sJ3-mJ! zkuQwq^20s&9@H>^Cj36nx4@s7yub!25b|Tl{~@S<!C6hFs59ux<;P50-y4XW98Gqy z2$obTC{)@x@D$pl`~u24fG#}(P{+wBS}29X1i%(ORbHR$tZ$_;*35!#X+eimF;q$J zfvpXTqoLq93I=CJ1JjRTiTRpcz-0)dDSUv)1akm9XR!RG=L}sY%|4^A(b1s*m?OqW zG#-hBO&%}Q3L)vjpTe_}v>A7I{B!}PG$8?e78so)pUalUE^T;t`rj6_xx;sh8I%X? zfcS68Fxd>u!G7>J&0s1sCG8PUmQ;jy6pt6d0{CAa*rx>k8=Tb_`&6;~C->>FNpE{D zF9vKTp+b*n&Ucsp25^$WjYR`E0`B*=J{>Z7T+=R5aL<!A@Nx$4dc^0;ekxrh75#tw zOqId^aRre2=ORC(?@zgY%JoAE{1EtOcKwv=hZOiB@Xze}pUI{4<#hqT0Uto4!IuGj z8t-Mm7YTAyS0@r=Lh_SaQ@97TDDs?F3m}l$8j`OJBxk=CXp|R{-5ul~DQV8eV*C`I zWq~F$GKuK3tdT}fNSsi!o>(Y`T-6NJTBrqnwy)e-vOUfJ3iAAATbR}zTc4oaI*|oS al_96?)KBiREA#-}A!LUYq%ym;iT?x=b#cxB literal 0 HcmV?d00001 From 8b6b573bde71eaa6b195163059e734fe8909d0fa Mon Sep 17 00:00:00 2001 From: marcos <marcos.alconada@artica.es> Date: Wed, 21 Oct 2020 16:18:07 +0200 Subject: [PATCH 025/104] fixed error with value status field --- pandora_console/operation/events/events.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 3ca4123b4f..196db1576e 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -1935,16 +1935,21 @@ function process_datatables_item(item) { /* Status */ img = '<?php echo html_print_image('images/star.png', true, ['title' => __('Unknown'), 'class' => 'forced-title']); ?>'; + state = '0'; switch (item.estado) { case "<?php echo EVENT_STATUS_NEW; ?>": img = '<?php echo html_print_image('images/star.png', true, ['title' => __('New event'), 'class' => 'forced-title']); ?>'; break; case "<?php echo EVENT_STATUS_VALIDATED; ?>": + + state = '1'; img = '<?php echo html_print_image('images/tick.png', true, [ 'title' => __('Event validated'), 'class' => 'forced-title']); ?>'; break; case "<?php echo EVENT_STATUS_INPROCESS; ?>": + state = '2'; + img = '<?php echo html_print_image('images/hourglass.png', true, [ 'title' => __('Event in process'), 'class' => 'forced-title']); ?>'; break; } @@ -1976,6 +1981,9 @@ function process_datatables_item(item) { } item.estado = '<div>'; + item.estado += '<span style="display: none">'; + item.estado += state; + item.estado += '</span>'; item.estado += img; item.estado += '</div>'; From ea87392bc12c435e2304c397c10622e5c964f0ae Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Wed, 21 Oct 2020 17:03:46 +0200 Subject: [PATCH 026/104] minor fix --- .../godmode/servers/servers.build_table.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index 169789d81c..fd6f8d7a02 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -91,18 +91,20 @@ foreach ($servers as $server) { // Status $data[1] = ui_print_status_image(STATUS_SERVER_OK, '', true); - if (($server['status'] == 0) || (($date - time_w_fixed_tz($server['keepalive'])) > ($server['server_keepalive']) * 2)) { - $data[1] = ui_print_status_image( - STATUS_SERVER_DOWN, - __('Server is stopped.'), - true - ); - } else if ($server['status'] == -1) { + if ($server['status'] == -1) { $data[1] = ui_print_status_image( STATUS_SERVER_CRASH, __('Server has crashed.'), true ); + } else if (($server['status'] == 0) + || (($date - time_w_fixed_tz($server['keepalive'])) > ($server['server_keepalive']) * 2) + ) { + $data[1] = ui_print_status_image( + STATUS_SERVER_DOWN, + __('Server is stopped.'), + true + ); } // Type From 5d69ca3126d13ee776a1493b6f2b029593a5d6ef Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Wed, 21 Oct 2020 17:54:33 +0200 Subject: [PATCH 027/104] recursion taken in mind in group report --- .../include/functions_reporting.php | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index c480969f16..f71269f288 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -2972,7 +2972,11 @@ function reporting_group_report($report, $content) $return['data']['count_events'] = count($events); - $return['data']['group_stats'] = reporting_get_group_stats($content['id_group']); + $return['data']['group_stats'] = reporting_get_group_stats( + $content['id_group'], + 'AR', + (bool) $content['recursion'] + ); if ($config['metaconsole']) { metaconsole_restore_db(); @@ -8969,7 +8973,7 @@ function reporting_get_agents_detailed_event( * * @return array Group statistics */ -function reporting_get_group_stats($id_group=0, $access='AR') +function reporting_get_group_stats($id_group=0, $access='AR', $recursion=true) { global $config; @@ -9071,16 +9075,19 @@ function reporting_get_group_stats($id_group=0, $access='AR') // Store the groups where we are quering $covered_groups = []; $group_array = []; - foreach ($id_group as $group) { - $children = groups_get_children($group); - // Show empty groups only if they have children with agents - // $group_array = array(); - foreach ($children as $sub) { - // If the group is quering previously, we ingore it - if (!in_array($sub['id_grupo'], $covered_groups)) { - array_push($covered_groups, $sub['id_grupo']); - array_push($group_array, $sub['id_grupo']); + foreach ($id_group as $group) { + if ($recursion === true) { + $children = groups_get_children($group); + + // Show empty groups only if they have children with agents + // $group_array = array(); + foreach ($children as $sub) { + // If the group is quering previously, we ingore it + if (!in_array($sub['id_grupo'], $covered_groups)) { + array_push($covered_groups, $sub['id_grupo']); + array_push($group_array, $sub['id_grupo']); + } } } From 335e74c26b2831a8edeafa605e26e7c482b7be2e Mon Sep 17 00:00:00 2001 From: Daniel Maya <daniel.maya@artica.es> Date: Thu, 22 Oct 2020 09:53:59 +0200 Subject: [PATCH 028/104] Fixed warning message in metaconsole --- pandora_console/godmode/users/configure_user.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index b98d35e003..3e9a38dede 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -1313,6 +1313,7 @@ $(document).ready (function () { var img_delete = '<?php echo $delete_image; ?>'; var id_user = '<?php echo io_safe_output($id); ?>'; + var is_metaconsole = '<?php echo $meta; ?>'; var data = []; $('input:image[name="add"]').click(function (e) { @@ -1357,7 +1358,7 @@ $(document).ready (function () { $('input:image[name="del"]').click(function (e) { e.preventDefault(); var rows = $("#table_profiles tr").length; - if (rows <= 3) { + if ((is_metaconsole === '1' && rows <= 4) || (is_metaconsole === '' && rows <= 3)) { if (!confirm('<?php echo __('Deleting last profile will delete this user'); ?>' + '. ' + '<?php echo __('Are you sure?'); ?>')) { return; } @@ -1379,7 +1380,7 @@ $(document).ready (function () { success: function (data) { row.remove(); var rows = $("#table_profiles tr").length; - if (rows <= 2) { + if ((is_metaconsole === '1' && rows <= 3) || (is_metaconsole === '' && rows <= 2)) { window.location.replace("<?php echo ui_get_full_url('index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user&pure=0', false, false, false); ?>"); } } @@ -1389,7 +1390,7 @@ $(document).ready (function () { $('#submit-crtbutton').click(function (e) { e.preventDefault(); var rows = $("#table_profiles tr").length; - if (rows <= 2) { + if ((is_metaconsole === '1' && rows <= 3) || (is_metaconsole === '' && rows <= 2)) { alert('<?php echo __('please add a profile'); ?>'); } else { this.form.submit(); From f2143545b3868fc7f25e99b6ef60368cc11a06b5 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Thu, 22 Oct 2020 13:35:42 +0200 Subject: [PATCH 029/104] Able to create users without profile assignment --- pandora_console/godmode/users/configure_user.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index b98d35e003..c1fdab851a 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -1388,11 +1388,16 @@ $(document).ready (function () { $('#submit-crtbutton').click(function (e) { e.preventDefault(); - var rows = $("#table_profiles tr").length; - if (rows <= 2) { - alert('<?php echo __('please add a profile'); ?>'); + if ($('input[name="is_admin"]:checked').val() == 1) { + // Admin does not require profiles. + $('#user_profile_form').submit(); } else { - this.form.submit(); + confirmDialog({ + message: "<?php echo __('User will be created without profiles assigned and won\'t be able to log in, are you sure?'); ?>", + onAccept: function() { + $('#user_profile_form').submit(); + } + }); } }); }); From 3738dfa5001ca985bbb968a3315018342ba7cdce Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Thu, 22 Oct 2020 15:17:09 +0200 Subject: [PATCH 030/104] removed extra messages while login using AD after change password in AD --- pandora_console/include/auth/mysql.php | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index 930e2cdbd2..dc0906a36c 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -263,11 +263,6 @@ function process_user_login_remote($login, $pass, $api=false) if ($config['autocreate_remote_users'] == 1) { if ($config['ad_save_password']) { $update_credentials = change_local_user_pass_ldap($login, $pass); - - if ($update_credentials) { - $config['auth_error'] = __('Your permissions have changed. Please, login again.'); - return false; - } } else { delete_user_pass_ldap($login); } @@ -288,11 +283,6 @@ function process_user_login_remote($login, $pass, $api=false) if ($return === 'error_permissions') { $config['auth_error'] = __('Problems with configuration permissions. Please contact with Administrator'); return false; - } else { - if ($return === 'permissions_changed') { - $config['auth_error'] = __('Your permissions have changed. Please, login again.'); - return false; - } } } } else if ($config['auth'] === 'ldap') { @@ -300,11 +290,6 @@ function process_user_login_remote($login, $pass, $api=false) if ($config['autocreate_remote_users'] == 1) { if ($config['ldap_save_password']) { $update_credentials = change_local_user_pass_ldap($login, $pass); - - if ($update_credentials) { - $config['auth_error'] = __('Your permissions have changed. Please, login again.'); - return false; - } } else { delete_user_pass_ldap($login); } @@ -326,11 +311,6 @@ function process_user_login_remote($login, $pass, $api=false) if ($return === 'error_permissions') { $config['auth_error'] = __('Problems with configuration permissions. Please contact with Administrator'); return false; - } else { - if ($return === 'permissions_changed') { - $config['auth_error'] = __('Your permissions have changed. Please, login again.'); - return false; - } } } } From 75bb4338b7a36ac09af8639075769a6924b35c9c Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Thu, 22 Oct 2020 18:10:46 +0200 Subject: [PATCH 031/104] fixes in event macros (responses) --- pandora_console/include/functions_events.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 7a337fbdab..6996157cbb 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -3811,7 +3811,7 @@ function events_get_response_target( if (strpos($target, '_alert_id_') !== false) { $target = str_replace( '_alert_id_', - empty($event['is_alert_am']) ? __('N/A') : $event['is_alert_am'], + empty($event['id_alert_am']) ? __('N/A') : $event['id_alert_am'], $target ); } @@ -3893,6 +3893,15 @@ function events_get_response_target( $target = str_replace('_current_user_', $config['id_user'], $target); } + // This will replace the macro with the command timeout value. + if (strpos($target, '_command_timeout_') !== false) { + $target = str_replace( + '_command_timeout_', + $event_response['command_timeout'], + $target + ); + } + return $target; } @@ -6973,7 +6982,7 @@ function events_get_field_value_by_event_id( if (strpos($value, '_group_name_') !== false) { $value = str_replace( '_group_name_', - groups_get_name($event['id_grupo'], true), + io_safe_output(groups_get_name($event['id_grupo'], true)), $value ); } From f3de0540fc804abd1951e7845c6427b587c41a73 Mon Sep 17 00:00:00 2001 From: Luis Calvo <luis.calvo@artica.es> Date: Thu, 22 Oct 2020 19:56:13 +0200 Subject: [PATCH 032/104] Fix continous reload page cased by automatic form submit --- pandora_console/godmode/reporting/visual_console_favorite.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_favorite.php b/pandora_console/godmode/reporting/visual_console_favorite.php index b9f4fe28d7..99f91c969c 100644 --- a/pandora_console/godmode/reporting/visual_console_favorite.php +++ b/pandora_console/godmode/reporting/visual_console_favorite.php @@ -115,7 +115,7 @@ if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'AW')) { $return_all_group, 'ag_group', $ag_group, - 'this.form.submit();', + '', '', 0, false, @@ -126,7 +126,7 @@ if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'AW')) { ); echo "</li></ul></li><li class='second_elements'><ul><li>"; echo __('Group Recursion'); - html_print_checkbox('recursion', 1, $recursion, false, false, 'this.form.submit()'); + html_print_checkbox('recursion', 1, $recursion, false, false, ''); echo '</li><li>'; echo "<input name='search_visual_console' type='submit' class='sub search' value='".__('Search')."'>"; echo '</li></ul></li></ul>'; From 5d812d58596e1d53bbc8c0ba6a02d4ce46fdcdd6 Mon Sep 17 00:00:00 2001 From: alejandro-campos <alejandro.campos@artica.es> Date: Fri, 23 Oct 2020 09:20:23 +0200 Subject: [PATCH 033/104] added new macros --- pandora_console/include/functions_events.php | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 7a337fbdab..c150aec85a 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -3692,6 +3692,38 @@ function events_get_response_target( $event_response = db_get_row('tevent_response', 'id', $response_id); $target = io_safe_output($event_response['target']); + if (strpos($target, '_agent_alias_') !== false) { + if ($meta) { + $agente_table_name = 'tmetaconsole_agent'; + $filter = [ + 'id_tagente' => $event['id_agente'], + 'id_tmetaconsole_setup' => $server_id, + ]; + } else { + $agente_table_name = 'tagente'; + $filter = ['id_agente' => $event['id_agente']]; + } + + $alias = db_get_value_filter('alias', $agente_table_name, $filter); + $target = str_replace('_agent_alias_', io_safe_output($alias), $target); + } + + if (strpos($target, '_agent_name_') !== false) { + if ($meta) { + $agente_table_name = 'tmetaconsole_agent'; + $filter = [ + 'id_tagente' => $event['id_agente'], + 'id_tmetaconsole_setup' => $server_id, + ]; + } else { + $agente_table_name = 'tagente'; + $filter = ['id_agente' => $event['id_agente']]; + } + + $name = db_get_value_filter('nombre', $agente_table_name, $filter); + $target = str_replace('_agent_name_', io_safe_output($name), $target); + } + // Substitute each macro. if (strpos($target, '_agent_address_') !== false) { if ($meta) { From bebac548d3946e1d972e5b946a54c3d674fdf931 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin <daniel.barbero@artica.es> Date: Fri, 23 Oct 2020 10:47:03 +0200 Subject: [PATCH 034/104] fix exportation/exportation --- .../extensions/resource_exportation.php | 6 +- .../extensions/resource_registration.php | 83 ++++++++++++++----- 2 files changed, 65 insertions(+), 24 deletions(-) diff --git a/pandora_console/extensions/resource_exportation.php b/pandora_console/extensions/resource_exportation.php index 3946ec053d..16cf674ab6 100755 --- a/pandora_console/extensions/resource_exportation.php +++ b/pandora_console/extensions/resource_exportation.php @@ -92,7 +92,11 @@ function output_xml_report($id) $group = db_get_value('nombre', 'tgrupo', 'id_grupo', $report['id_group']); echo '<group><![CDATA['.io_safe_output($group)."]]></group>\n"; - $items = db_get_all_rows_field_filter('treport_content', 'id_report', $report['id_report']); + $items = db_get_all_rows_field_filter( + 'treport_content', + 'id_report', + $report['id_report'] + ); foreach ($items as $item) { echo "<item>\n"; echo '<type>'.io_safe_output($item['type'])."</type>\n"; diff --git a/pandora_console/extensions/resource_registration.php b/pandora_console/extensions/resource_registration.php index dae61e3a78..80fed2cf6c 100755 --- a/pandora_console/extensions/resource_registration.php +++ b/pandora_console/extensions/resource_registration.php @@ -37,8 +37,16 @@ function insert_item_report($report_id, $values) ui_print_result_message( $result, - sprintf(__("Success add '%s' item in report '%s'."), $values['type'], $name), - sprintf(__("Error create '%s' item in report '%s'."), $values['type'], $name) + sprintf( + __("Success add '%s' item in report '%s'."), + $values['type'], + $name + ), + sprintf( + __("Error create '%s' item in report '%s'."), + $values['type'], + $name + ) ); } } @@ -55,9 +63,12 @@ function process_upload_xml_report($xml, $group_filter=0) $posible_name = $values['name']; $exist = true; $loops = 30; - // Loops to exit or tries + // Loops to exit or tries. while ($exist && $loops > 0) { - $exist = (bool) db_get_row_filter('treport', ['name' => io_safe_input($posible_name)]); + $exist = (bool) db_get_row_filter( + 'treport', + ['name' => io_safe_input($posible_name)] + ); if ($exist) { $loops--; @@ -74,7 +85,7 @@ function process_upload_xml_report($xml, $group_filter=0) ); break; } else if ($loops != 30) { - ui_print_error_message( + ui_print_warning_message( sprintf( __("Warning create '%s' report, the name exist, the report have a name %s."), $reportElement->name, @@ -89,13 +100,22 @@ function process_upload_xml_report($xml, $group_filter=0) break; } - $id_group = db_get_value('id_grupo', 'tgrupo', 'nombre', $reportElement->group); - if ($id_group === false) { - ui_print_error_message(__("Error the report haven't group.")); - break; + if (isset($reportElement->group) === true + && empty($reportElement->group) === false + ) { + $id_group = db_get_value( + 'id_grupo', + 'tgrupo', + 'nombre', + $reportElement->group + ); + if ($id_group === false) { + ui_print_error_message(__("Error the report haven't group.")); + break; + } } - if (isset($reportElement->description)) { + if (isset($reportElement->description) === true) { $values['description'] = $reportElement->description; } @@ -108,9 +128,19 @@ function process_upload_xml_report($xml, $group_filter=0) ); if ($id_report) { - db_pandora_audit('Report management', 'Create report '.$id_report, false, false); + db_pandora_audit( + 'Report management', + 'Create report '.$id_report, + false, + false + ); } else { - db_pandora_audit('Report management', 'Fail to create report', false, false); + db_pandora_audit( + 'Report management', + 'Fail to create report', + false, + false + ); break; } @@ -119,45 +149,52 @@ function process_upload_xml_report($xml, $group_filter=0) $values = []; $values['id_report'] = $id_report; - if (isset($item['description'])) { + if (isset($item['description']) === true) { $values['description'] = io_safe_input($item['description']); } - if (isset($item['period'])) { + if (isset($item['period']) === true) { $values['period'] = io_safe_input($item['period']); } - if (isset($item['type'])) { + if (isset($item['type']) === true) { $values['type'] = io_safe_input($item['type']); } $agents_item = []; - if (isset($item['agent'])) { + if (isset($item['agent']) === true) { $agents = agents_get_agents( ['id_grupo' => $group_filter], [ 'id_agente', - 'nombre', + 'alias', ] ); - $agent_clean = str_replace(['[', ']'], '', $item['agent']); + $agent_clean = str_replace( + [ + '[', + ']', + ], + '', + io_safe_output($item['agent']) + ); $regular_expresion = ($agent_clean != $item['agent']); foreach ($agents as $agent) { if ($regular_expresion) { - if ((bool) preg_match('/'.$agent_clean.'/', io_safe_output($agent['nombre']))) { - $agents_item[$agent['id_agente']]['name'] = $agent['nombre']; + if ((bool) preg_match('/'.$agent_clean.'/', io_safe_output($agent['alias']))) { + $agents_item[$agent['id_agente']]['name'] = $agent['alias']; } } else { - if ($agent_clean == io_safe_output($agent['nombre'])) { - $agents_item[$agent['id_agente']]['name'] = $agent['nombre']; + if ($agent_clean == io_safe_output($agent['alias'])) { + $agents_item[$agent['id_agente']]['name'] = $agent['alias']; } } } } - if (isset($item['module'])) { + if (isset($item['module']) === true) { $module_clean = str_replace(['[', ']'], '', $item['module']); $regular_expresion = ($module_clean != $item['module']); From 765d7938f90307a324de6bb865c0832ba9f17f8b Mon Sep 17 00:00:00 2001 From: Jose Gonzalez <jose.gonzalez@artica.es> Date: Fri, 23 Oct 2020 12:20:20 +0200 Subject: [PATCH 035/104] Handled comments for validated comments --- pandora_console/include/ajax/events.php | 4 ++- pandora_console/include/functions_events.php | 36 +++++++++++++------- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 230b55a476..d6a760413b 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -114,7 +114,9 @@ if ($get_comments) { sprintf( ' HAVING max_id_evento = %d', $event['id_evento'] - ) + ), + // True for show comments of validated events. + true ); if ($events !== false) { $event = $events[0]; diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 7a337fbdab..8efeff3f2e 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -673,15 +673,16 @@ function events_update_status($id_evento, $status, $filter=null, $history=false) /** * Retrieve all events filtered. * - * @param array $fields Fields to retrieve. - * @param array $filter Filters to be applied. - * @param integer $offset Offset (pagination). - * @param integer $limit Limit (pagination). - * @param string $order Sort order. - * @param string $sort_field Sort field. - * @param boolean $history Apply on historical table. - * @param boolean $return_sql Return SQL (true) or execute it (false). - * @param string $having Having filter. + * @param array $fields Fields to retrieve. + * @param array $filter Filters to be applied. + * @param integer $offset Offset (pagination). + * @param integer $limit Limit (pagination). + * @param string $order Sort order. + * @param string $sort_field Sort field. + * @param boolean $history Apply on historical table. + * @param boolean $return_sql Return SQL (true) or execute it (false). + * @param string $having Having filter. + * @param boolean $validatedEvents If true, evaluate validated events. * * @return array Events. * @throws Exception On error. @@ -695,7 +696,8 @@ function events_get_all( $sort_field=null, $history=false, $return_sql=false, - $having='' + $having='', + $validatedEvents=false ) { global $config; @@ -926,10 +928,20 @@ function events_get_all( break; case EVENT_NO_VALIDATED: + // Show comments in validated events. + $validatedState = ''; + if ($validatedEvents === true) { + $validatedState = sprintf( + 'OR estado = %d', + EVENT_VALIDATE + ); + } + $sql_filters[] = sprintf( - ' AND (estado = %d OR estado = %d)', + ' AND (estado = %d OR estado = %d %s)', EVENT_NEW, - EVENT_PROCESS + EVENT_PROCESS, + $validatedState ); break; } From 4ff09235899f8e8210f1f5144f7dd74cdb9d4790 Mon Sep 17 00:00:00 2001 From: alejandro-campos <alejandro.campos@artica.es> Date: Fri, 23 Oct 2020 13:53:38 +0200 Subject: [PATCH 036/104] fixed sound events --- .../operation/events/sound_events.php | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/pandora_console/operation/events/sound_events.php b/pandora_console/operation/events/sound_events.php index 4377faaa63..5037e63b22 100644 --- a/pandora_console/operation/events/sound_events.php +++ b/pandora_console/operation/events/sound_events.php @@ -77,7 +77,7 @@ $table->data[0][2] = __('Type'); $table->data[0][3] = html_print_checkbox('alert_fired', 'alert_fired', true, true, false, 'changeType();').__('Alert fired').'<br />'.html_print_checkbox('critical', 'critical', true, true, false, 'changeType();').__('Monitor critical').'<br />'.html_print_checkbox('unknown', 'unknown', true, true, false, 'changeType();').__('Monitor unknown').'<br />'.html_print_checkbox('warning', 'warning', true, true, false, 'changeType();').__('Monitor warning').'<br />'; $table->data[1][0] = __('Agent'); -$table->data[1][1] = html_print_select($agents, 'id_agents[]', true, false, '', '', true, true, '', '', '', 'width:120px; height:100px', '', false, '', '', true); +$table->data[1][1] = html_print_select($agents, 'id_agents[]', true, false, '', '', true, true, '', '', '', 'max-width:200px; height:100px', '', false, '', '', true); $table->data[1][2] = __('Event'); $table->data[1][3] = html_print_textarea('events_fired', 200, 20, '', 'readonly="readonly" style="max-height:100px; background: #ddd; resize:none;"', true); @@ -152,10 +152,26 @@ function changeGroup() { } function changeType() { - alert_fired = $("input[name=alert_fired]").attr('checked'); - critical = $("input[name=critical]").attr('checked'); - warning = $("input[name=warning]").attr('checked'); - unknown = $("input[name=unknown]").attr('checked'); + alert_fired = false; + critical = false; + warning = false; + unknown = false; + + if($("input[name=alert_fired]").is(':checked') ) { + alert_fired = true; + } + + if($("input[name=critical]").is(':checked') ) { + critical = true; + } + + if($("input[name=warning]").is(':checked') ) { + warning = true; + } + + if($("input[name=unknown]").is(':checked') ) { + unknown = true; + } } function toggleButton() { @@ -256,9 +272,6 @@ $(document).ready (function () { setInterval("check_event()", (10 * 1000)); //10 seconds between ajax request $("#table1").css("background-color", "#fff"); $("#table2").css("background-color", "#fff"); - - group_width = $("#group").width(); - $("#id_agents").width(group_width + 9); }); </script> From 29174a87ef41d38638f5877feef99bfe57a6c190 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Mon, 26 Oct 2020 10:14:14 +0100 Subject: [PATCH 037/104] removed strict-user from monitor detail --- .../operation/agentes/status_monitor.php | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index a49db7b7f4..7be62557f4 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -701,7 +701,6 @@ foreach ($custom_fields as $custom_field) { $table_custom_fields->data[] = $row; } - $filters = '<form method="post" action="index.php?sec=view&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params.'">'; if (is_metaconsole()) { $table->colspan[4][0] = 7; @@ -1750,24 +1749,13 @@ if (!empty($result)) { // End Build List Result. echo "<div id='monitor_details_window'></div>"; -// Strict user hidden. -echo '<div id="strict_hidden" style="display:none;">'; -html_print_input_text('strict_user_hidden', $strict_user); -echo '</div>'; enterprise_hook('close_meta_frame'); ui_require_javascript_file('pandora_modules'); ?> -<script type='text/javascript'> -$(document).ready (function () { - if ($('#ag_group').val() != 0) { - $('#tag_filter').css('display', 'none'); - $('#tag_td').css('display', 'none'); - } -}); - +<script type="text/javascript"> $('#moduletype').click(function() { jQuery.get ( @@ -1789,17 +1777,6 @@ $('#moduletype').click(function() { return false; }); -$('#ag_group').change (function () { - strict_user = $('#text-strict_user_hidden').val(); - - if (($('#ag_group').val() != 0) && (strict_user != 0)) { - $('#tag_filter').css('display', 'none'); - $('#tag_td').css('display', 'none'); - } else { - $('#tag_filter').css('display', ''); - $('#tag_td').css('display', ''); - } -}); function toggle_full_value(id) { text = $('#hidden_value_module_' + id).html(); From 806377a884e237f8f6fa7993e1a64727ea37efcb Mon Sep 17 00:00:00 2001 From: alejandro-campos <alejandro.campos@artica.es> Date: Tue, 27 Oct 2020 10:28:42 +0100 Subject: [PATCH 038/104] fixed authentication bypass --- pandora_console/index.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index af8671ded7..599e013c12 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -750,7 +750,17 @@ if (! isset($config['id_user'])) { $pass2 = get_parameter_post('pass2'); $id_user = get_parameter_post('id_user'); - if ($correct_pass_change && !empty($pass1) && !empty($pass2) && !empty($id_user)) { + if ($reset_hash != '') { + $hash_data = explode(':::', $reset_hash); + $id_user = $hash_data[0]; + $codified_hash = $hash_data[1]; + + $db_reset_pass_entry = db_get_value_filter('reset_time', 'treset_pass', ['id_user' => $id_user, 'cod_hash' => $id_user.':::'.$codified_hash]); + } + + if ($correct_pass_change && !empty($pass1) && !empty($pass2) && !empty($id_user) && $db_reset_pass_entry) { + delete_reset_pass_entry($id_user); + $correct_reset_pass_process = ''; $process_error_message = ''; @@ -787,21 +797,14 @@ if (! isset($config['id_user'])) { include_once 'general/login_page.php'; } else { if ($reset_hash != '') { - $hash_data = explode(':::', $reset_hash); - $id_user = $hash_data[0]; - $codified_hash = $hash_data[1]; - - $db_reset_pass_entry = db_get_value_filter('reset_time', 'treset_pass', ['id_user' => $id_user, 'cod_hash' => $id_user.':::'.$codified_hash]); $process_error_message = ''; if ($db_reset_pass_entry) { if (($db_reset_pass_entry + SECONDS_2HOUR) < time()) { register_pass_change_try($id_user, 0); $process_error_message = __('Too much time since password change request'); - delete_reset_pass_entry($id_user); include_once 'general/login_page.php'; } else { - delete_reset_pass_entry($id_user); include_once 'enterprise/include/process_reset_pass.php'; } } else { From 315e522b2e09fea5df3dbe4d3cc0510774e1db2e Mon Sep 17 00:00:00 2001 From: alejandro-campos <alejandro.campos@artica.es> Date: Tue, 27 Oct 2020 12:01:38 +0100 Subject: [PATCH 039/104] added check for element --- .../agentes/module_manager_editor_common.php | 212 ++++++++-------- .../manage_network_components_form_common.php | 231 +++++++++--------- 2 files changed, 224 insertions(+), 219 deletions(-) diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index e6d384e5e4..b6a7213ef8 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -1340,115 +1340,117 @@ $(document).ready (function () { var type_name_selected = type_names[type_selected]; var element = document.getElementById("module_type_help"); var language = "<?php echo $config['language']; ?>" ; - element.onclick = function (event) { - if(type_name_selected == 'async_data' || - type_name_selected == 'async_proc' || - type_name_selected == 'async_string' || - type_name_selected == 'generic_proc'|| - type_name_selected == 'generic_data' || - type_name_selected == 'generic_data_inc' || - type_name_selected == 'generic_data_inc_abs'|| - type_name_selected == 'generic_data_string' || - type_name_selected == 'keep_alive' - ){ - if (language == 'es'){ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Operacion&printable=yes#Tipos_de_m.C3.B3dulos', - '_blank', - 'width=800,height=600' - ); - } - else{ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Operations&printable=yes#Types_of_Modules', - '_blank', - 'width=800,height=600' - ); - } - - - } - if(type_name_selected == 'remote_icmp' || - type_name_selected == 'remote_icmp_proc' - ){ - if(language == 'es'){ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_ICMP', - '_blank', - 'width=800,height=600' - ); - } - else{ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#ICMP_Monitoring', - '_blank', - 'width=800,height=600' - ); - } - - - } - if(type_name_selected == 'remote_snmp_string' || - type_name_selected == 'remote_snmp_proc' || - type_name_selected == 'remote_snmp_inc' || - type_name_selected == 'remote_snmp' - ){ - if(language == 'es'){ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizando_con_m.C3.B3dulos_de_red_tipo_SNMP', - '_blank', - 'width=800,height=600' - ); - } - else{ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#Monitoring_by_Network_Modules_with_SNMP', - '_blank', - 'width=800,height=600' - ); - } - - - } - if(type_name_selected == 'remote_tcp_string' || - type_name_selected == 'remote_tcp_proc' || - type_name_selected == 'remote_tcp_inc' || - type_name_selected == 'remote_tcp' - ){ - if(language == 'es'){ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_TCP', - '_blank', - 'width=800,height=600' - ); + if (typeof element !== 'undefined' && element !== null) { + element.onclick = function (event) { + if(type_name_selected == 'async_data' || + type_name_selected == 'async_proc' || + type_name_selected == 'async_string' || + type_name_selected == 'generic_proc'|| + type_name_selected == 'generic_data' || + type_name_selected == 'generic_data_inc' || + type_name_selected == 'generic_data_inc_abs'|| + type_name_selected == 'generic_data_string' || + type_name_selected == 'keep_alive' + ){ + if (language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Operacion&printable=yes#Tipos_de_m.C3.B3dulos', + '_blank', + 'width=800,height=600' + ); } else{ window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#TCP_Monitoring', - '_blank', - 'width=800,height=600' - ); - } - } - if(type_name_selected == 'web_data' || - type_name_selected == 'web_proc' || - type_name_selected == 'web_content_data' || - type_name_selected == 'web_content_string' - ){ - if(language == 'es'){ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_web&printable=yes#Creaci.C3.B3n_de_m.C3.B3dulos_web', - '_blank', - 'width=800,height=600' - ); - } - else{ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Web_Monitoring&printable=yes#Creating_Web_Modules', - '_blank', - 'width=800,height=600' - ); + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Operations&printable=yes#Types_of_Modules', + '_blank', + 'width=800,height=600' + ); } + + + } + if(type_name_selected == 'remote_icmp' || + type_name_selected == 'remote_icmp_proc' + ){ + if(language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_ICMP', + '_blank', + 'width=800,height=600' + ); + } + else{ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#ICMP_Monitoring', + '_blank', + 'width=800,height=600' + ); + } + + + } + if(type_name_selected == 'remote_snmp_string' || + type_name_selected == 'remote_snmp_proc' || + type_name_selected == 'remote_snmp_inc' || + type_name_selected == 'remote_snmp' + ){ + if(language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizando_con_m.C3.B3dulos_de_red_tipo_SNMP', + '_blank', + 'width=800,height=600' + ); + } + else{ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#Monitoring_by_Network_Modules_with_SNMP', + '_blank', + 'width=800,height=600' + ); + } + + + } + if(type_name_selected == 'remote_tcp_string' || + type_name_selected == 'remote_tcp_proc' || + type_name_selected == 'remote_tcp_inc' || + type_name_selected == 'remote_tcp' + ){ + if(language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_TCP', + '_blank', + 'width=800,height=600' + ); + } + else{ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#TCP_Monitoring', + '_blank', + 'width=800,height=600' + ); + } + } + if(type_name_selected == 'web_data' || + type_name_selected == 'web_proc' || + type_name_selected == 'web_content_data' || + type_name_selected == 'web_content_string' + ){ + if(language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_web&printable=yes#Creaci.C3.B3n_de_m.C3.B3dulos_web', + '_blank', + 'width=800,height=600' + ); + } + else{ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Web_Monitoring&printable=yes#Creating_Web_Modules', + '_blank', + 'width=800,height=600' + ); + } + } } } diff --git a/pandora_console/godmode/modules/manage_network_components_form_common.php b/pandora_console/godmode/modules/manage_network_components_form_common.php index 35c5648db2..d42e93c949 100644 --- a/pandora_console/godmode/modules/manage_network_components_form_common.php +++ b/pandora_console/godmode/modules/manage_network_components_form_common.php @@ -386,121 +386,124 @@ $next_row++; console.log(type_name_selected); var element = document.getElementById("module_type_help"); var language = "<?php echo $config['language']; ?>" ; - element.onclick = function (event) { - if(type_name_selected == 'async_data' || - type_name_selected == 'async_proc' || - type_name_selected == 'async_string' || - type_name_selected == 'generic_proc'|| - type_name_selected == 'generic_data' || - type_name_selected == 'generic_data_inc' || - type_name_selected == 'generic_data_inc_abs'|| - type_name_selected == 'generic_data_string' || - type_name_selected == 'keep_alive' - ){ - if (language == 'es'){ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Operacion&printable=yes#Tipos_de_m.C3.B3dulos', - '_blank', - 'width=800,height=600' - ); - } - else{ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Operations&printable=yes#Types_of_Modules', - '_blank', - 'width=800,height=600' - ); - } - - + + if (typeof element !== 'undefined' && element !== null) { + element.onclick = function (event) { + if(type_name_selected == 'async_data' || + type_name_selected == 'async_proc' || + type_name_selected == 'async_string' || + type_name_selected == 'generic_proc'|| + type_name_selected == 'generic_data' || + type_name_selected == 'generic_data_inc' || + type_name_selected == 'generic_data_inc_abs'|| + type_name_selected == 'generic_data_string' || + type_name_selected == 'keep_alive' + ){ + if (language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Operacion&printable=yes#Tipos_de_m.C3.B3dulos', + '_blank', + 'width=800,height=600' + ); + } + else{ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Operations&printable=yes#Types_of_Modules', + '_blank', + 'width=800,height=600' + ); + } + + + } + if(type_name_selected == 'remote_icmp' || + type_name_selected == 'remote_icmp_proc' + ){ + if(language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_ICMP', + '_blank', + 'width=800,height=600' + ); + } + else{ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#ICMP_Monitoring', + '_blank', + 'width=800,height=600' + ); + } + + + } + if(type_name_selected == 'remote_snmp_string' || + type_name_selected == 'remote_snmp_proc' || + type_name_selected == 'remote_snmp_inc' || + type_name_selected == 'remote_snmp' + ){ + if(language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizando_con_m.C3.B3dulos_de_red_tipo_SNMP', + '_blank', + 'width=800,height=600' + ); + } + else{ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#Monitoring_by_Network_Modules_with_SNMP', + '_blank', + 'width=800,height=600' + ); + } + + + } + if(type_name_selected == 'remote_tcp_string' || + type_name_selected == 'remote_tcp_proc' || + type_name_selected == 'remote_tcp_inc' || + type_name_selected == 'remote_tcp' + ){ + if(language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_TCP', + '_blank', + 'width=800,height=600' + ); + } + else{ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#TCP_Monitoring', + '_blank', + 'width=800,height=600' + ); + } + + + } + if(type_name_selected == 'web_data' || + type_name_selected == 'web_proc' || + type_name_selected == 'web_content_data' || + type_name_selected == 'web_content_string' + ){ + if(language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_web&printable=yes#Creaci.C3.B3n_de_m.C3.B3dulos_web', + '_blank', + 'width=800,height=600' + ); + } + else{ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Web_Monitoring&printable=yes#Creating_Web_Modules', + '_blank', + 'width=800,height=600' + ); + } + + + } + } } - if(type_name_selected == 'remote_icmp' || - type_name_selected == 'remote_icmp_proc' - ){ - if(language == 'es'){ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_ICMP', - '_blank', - 'width=800,height=600' - ); - } - else{ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#ICMP_Monitoring', - '_blank', - 'width=800,height=600' - ); - } - - - } - if(type_name_selected == 'remote_snmp_string' || - type_name_selected == 'remote_snmp_proc' || - type_name_selected == 'remote_snmp_inc' || - type_name_selected == 'remote_snmp' - ){ - if(language == 'es'){ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizando_con_m.C3.B3dulos_de_red_tipo_SNMP', - '_blank', - 'width=800,height=600' - ); - } - else{ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#Monitoring_by_Network_Modules_with_SNMP', - '_blank', - 'width=800,height=600' - ); - } - - - } - if(type_name_selected == 'remote_tcp_string' || - type_name_selected == 'remote_tcp_proc' || - type_name_selected == 'remote_tcp_inc' || - type_name_selected == 'remote_tcp' - ){ - if(language == 'es'){ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_TCP', - '_blank', - 'width=800,height=600' - ); - } - else{ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#TCP_Monitoring', - '_blank', - 'width=800,height=600' - ); - } - - - } - if(type_name_selected == 'web_data' || - type_name_selected == 'web_proc' || - type_name_selected == 'web_content_data' || - type_name_selected == 'web_content_string' - ){ - if(language == 'es'){ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_web&printable=yes#Creaci.C3.B3n_de_m.C3.B3dulos_web', - '_blank', - 'width=800,height=600' - ); - } - else{ - window.open( - 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Web_Monitoring&printable=yes#Creating_Web_Modules', - '_blank', - 'width=800,height=600' - ); - } - - - } - } if (type_name_selected.match(/_string$/) == null) { // Numeric types From 8b4bcc77ab4954250667e4d147ce8b55e5ec1fbf Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Tue, 27 Oct 2020 13:56:38 +0100 Subject: [PATCH 040/104] Update functions_events.php (io_safe_output over _event_date_) --- pandora_console/include/functions_events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 6996157cbb..67448d06e6 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -3787,7 +3787,7 @@ function events_get_response_target( if (strpos($target, '_event_date_') !== false) { $target = str_replace( '_event_date_', - date($config['date_format'], $event['utimestamp']), + io_safe_output(date($config['date_format'], $event['utimestamp'])), $target ); } From 9b81da193b42b9f69847a9888021ae46aadf7b6c Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin <daniel.barbero@artica.es> Date: Wed, 28 Oct 2020 12:50:15 +0100 Subject: [PATCH 041/104] fix charts --- pandora_console/include/functions_graph.php | 10 +++------- .../include/functions_treeview.php | 2 +- .../include/graphs/functions_flot.php | 19 ++++++------------- pandora_console/include/styles/pandora.css | 8 +++++++- .../operation/agentes/stat_win.php | 1 + 5 files changed, 18 insertions(+), 22 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 4fd1439f8f..f40b75e3b2 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -2541,13 +2541,9 @@ function graphic_agentaccess( } else { $options['generals']['pdf']['width'] = 350; $options['generals']['pdf']['height'] = 125; - if (!empty($data_array)) { - $imgbase64 = '<img src="data:image/jpg;base64,'; - $imgbase64 .= vbar_graph($data_array, $options, 2); - $imgbase64 .= '" />'; - } else { - $imgbase64 .= vbar_graph($data_array, $options, 2); - } + $imgbase64 = '<img src="data:image/jpg;base64,'; + $imgbase64 .= vbar_graph($data_array, $options, 2); + $imgbase64 .= '" />'; return $imgbase64; } diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index 25e0f67020..67bed22be3 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -802,7 +802,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) $events_graph = '<div style="width: 100%; height: 90px; display: flex; flex-direction: row; justify-content: center;">'; $events_graph .= graph_graphic_agentevents( $id_agente, - '385px;', + '340px;margin:0', 45, SECONDS_1DAY, '', diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index dc4e556292..81c9cc79cf 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -346,13 +346,7 @@ function menu_graph( $threshold = true; } - $return .= "<div id='general_menu_$graph_id' class='menu_graph' style=' - width: 20px; - height: 150px; - left:100%; - position: absolute; - top: 0px; - background-color: tranparent;'>"; + $return .= "<div id='general_menu_$graph_id' class='menu_graph'>"; $return .= "<div id='menu_$graph_id' "."style='display: none; ".'text-align: center;'.'position: relative;'."border-bottom: 0px;'> <a href='javascript:'><img id='menu_cancelzoom_$graph_id' src='".$params['homeurl']."images/zoom_cross_grey.disabled.png' alt='".__('Cancel zoom')."' title='".__('Cancel zoom')."'></a>"; if ($threshold) { @@ -745,13 +739,12 @@ function flot_slicesbar_graph( // Set some containers to legend, graph, timestamp tooltip, etc. $height = ((int) $height + 15); - if ($stat_win) { - $return = "<div id='$graph_id' class='noresizevc graph $adapt_key' style='width: ".$width.'%; height: '.$height."px; display: inline-block;'></div>"; - } else { - $return = "<div id='$graph_id' class='noresizevc graph $adapt_key' style='width: ".$width.'%; height: '.$height."px;'></div>"; - } - $return .= "<div id='value_$graph_id' style='display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px'></div>"; + $style = 'width:'.$width.'%;'; + $style .= 'height:'.$height.'px;'; + $return = "<div id='".$graph_id."' class='noresizevc graph ".$adapt_key."' style='".$style."'></div>"; + + $return .= "<div id='value_".$graph_id."' style='display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px'></div>"; // Set a weird separator to serialize and unserialize // passing data from php to javascript. diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 6b48ab13ae..d1696d8986 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -3073,6 +3073,12 @@ div#stat-win-module-graph div.nodata_container { } .menu_graph { + width: 30px; + height: 150px; + left: 100%; + position: absolute; + top: 0px; + background-color: transparent; -moz-border-top-right-radius: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; @@ -5865,7 +5871,7 @@ table.table_modal_alternate tr td:first-child { } .flot-text { - width: 101%; + width: 100%; } /*Font header feedback*/ diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index 1d26666b57..d5e22eb06b 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -35,6 +35,7 @@ require_once $config['homedir'].'/include/functions_graph.php'; require_once $config['homedir'].'/include/functions_modules.php'; require_once $config['homedir'].'/include/functions_agents.php'; require_once $config['homedir'].'/include/functions_tags.php'; +require_once $config['homedir'].'/include/php_to_js_values.php'; enterprise_include_once('include/functions_agents.php'); check_login(); From 170ee5b9a551696986357db0d9515247fc55d3ed Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin <daniel.barbero@artica.es> Date: Wed, 28 Oct 2020 15:36:38 +0100 Subject: [PATCH 042/104] fixed csv charts --- .../flot/jquery.flot.exportdata.pandora.js | 721 +++++++++--------- 1 file changed, 360 insertions(+), 361 deletions(-) diff --git a/pandora_console/include/graphs/flot/jquery.flot.exportdata.pandora.js b/pandora_console/include/graphs/flot/jquery.flot.exportdata.pandora.js index 6466a72835..47b8879ace 100644 --- a/pandora_console/include/graphs/flot/jquery.flot.exportdata.pandora.js +++ b/pandora_console/include/graphs/flot/jquery.flot.exportdata.pandora.js @@ -1,425 +1,424 @@ -(function ($) { - var options = { - export: { - export_data: false, // or true - labels_long: null, - homeurl: "", - }, - }; +(function($) { + var options = { + export: { + export_data: false, // or true + labels_long: null, + homeurl: "" + } + }; - function init(plot) { - plot.exportDataCSV = function (args) { - //amount = plot.getOptions().export.type, - //options = options || {}; + function init(plot) { + plot.exportDataCSV = function(args) { + //amount = plot.getOptions().export.type, + //options = options || {}; - // Options - var type = "csv"; - type = type.toLowerCase().trim(); + // Options + var type = "csv"; + type = type.toLowerCase().trim(); - var graphData, - dataObject, - dataObjects = plot.getData(), - result = []; + var graphData, + dataObject, + dataObjects = plot.getData(), + result = []; - // Throw errors - var retrieveDataOject = function (dataObjects) { - var result; + // Throw errors + var retrieveDataOject = function(dataObjects) { + var result; - if (typeof dataObjects === "undefined") - throw new Error("Empty parameter"); + if (typeof dataObjects === "undefined") + throw new Error("Empty parameter"); - // Try to retrieve the avg set (not 100% reliable, I know) - if (dataObjects.length == 1) { - result = dataObjects.shift(); - } - if (dataObjects.length > 1) { - dataObjects.forEach(function (element) { - if (/^Avg.:/i.test(element.label)) result = element; - }); + // Try to retrieve the avg set (not 100% reliable, I know) + if (dataObjects.length == 1) { + result = dataObjects.shift(); + } + if (dataObjects.length > 1) { + dataObjects.forEach(function(element) { + if (/^Avg.:/i.test(element.label)) result = element; + }); - // If the avg set is missing, retrieve the first set - if (typeof result === "undefined") result = dataObjects.shift(); - } + // If the avg set is missing, retrieve the first set + if (typeof result === "undefined") result = dataObjects.shift(); + } - if (typeof result === "undefined") throw new Error("Empty result"); + if (typeof result === "undefined") throw new Error("Empty result"); - return result; - }; + return result; + }; - // Throw errors - var processDataObject = function (dataObject) { - var result; + // Throw errors + var processDataObject = function(dataObject) { + var result; - if (typeof dataObject === "undefined") - throw new Error("Empty parameter"); + if (typeof dataObject === "undefined") + throw new Error("Empty parameter"); - if ( - typeof dataObject.data === "undefined" || - !(dataObject.data instanceof Array) - ) - throw new Error("Object malformed"); + if ( + typeof dataObject.data === "undefined" || + !(dataObject.data instanceof Array) + ) + throw new Error("Object malformed"); - /* { - * head: [<column>,<column>,...,<column>], - * data: [ - * [<data>,<data>,...,<data>], - * [<data>,<data>,...,<data>], - * ..., - * [<data>,<data>,...,<data>], - * ] - * } - */ - if (type === "csv") { - result = { - head: ["timestap", "date", "value", "label"], - data: [], - }; + /* { + * head: [<column>,<column>,...,<column>], + * data: [ + * [<data>,<data>,...,<data>], + * [<data>,<data>,...,<data>], + * ..., + * [<data>,<data>,...,<data>], + * ] + * } + */ + if (type === "csv") { + result = { + head: ["timestamp", "date", "value", "label"], + data: [] + }; - dataObject.data.forEach(function (item, index) { - var timestap = item[0]; + dataObject.data.forEach(function(item, index) { + var timestamp = item[0]; - var d = new Date(item[0]); - var monthNames = [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec", - ]; + var d = new Date(item[0]); + var monthNames = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ]; - date_format = - (d.getDate() < 10 ? "0" : "") + - d.getDate() + - " " + - monthNames[d.getMonth()] + - " " + - d.getFullYear() + - " " + - (d.getHours() < 10 ? "0" : "") + - d.getHours() + - ":" + - (d.getMinutes() < 10 ? "0" : "") + - d.getMinutes() + - ":" + - (d.getSeconds() < 10 ? "0" : "") + - d.getSeconds(); + date_format = + (d.getDate() < 10 ? "0" : "") + + d.getDate() + + " " + + monthNames[d.getMonth()] + + " " + + d.getFullYear() + + " " + + (d.getHours() < 10 ? "0" : "") + + d.getHours() + + ":" + + (d.getMinutes() < 10 ? "0" : "") + + d.getMinutes() + + ":" + + (d.getSeconds() < 10 ? "0" : "") + + d.getSeconds(); - var date = date_format; + var date = date_format; - var value = item[1]; + var value = item[1]; - var clean_label = plot.getOptions().export.labels_long[ - dataObject.label - ]; - clean_label = clean_label.replace(new RegExp(" ", "g"), " "); - result.data.push([timestap, date, value, clean_label]); - }); - } else if (type === "json") { - /* [ - * { - * 'date': <date>, - * 'value': <value> - * } - * ], - * [ - * { - * 'date': <date>, - * 'value': <value> - * } - * ], - * ..., - * [ - * { - * 'date': <date>, - * 'value': <value> - * } - * ] - */ - result = []; + var clean_label = plot.getOptions().export.labels_long[ + dataObject.label + ]; + clean_label = clean_label.replace(new RegExp(" ", "g"), " "); + result.data.push([timestamp, date, value, clean_label]); + }); + } else if (type === "json") { + /* [ + * { + * 'date': <date>, + * 'value': <value> + * } + * ], + * [ + * { + * 'date': <date>, + * 'value': <value> + * } + * ], + * ..., + * [ + * { + * 'date': <date>, + * 'value': <value> + * } + * ] + */ + result = []; - dataObject.data.forEach(function (item, index) { - var date = "", - value = item[1]; + dataObject.data.forEach(function(item, index) { + var date = "", + value = item[1]; - // Long labels are preferred - if (typeof labels_long[index] !== "undefined") - date = labels_long[index]; - else if (typeof labels[index] !== "undefined") date = labels[index]; + // Long labels are preferred + if (typeof labels_long[index] !== "undefined") + date = labels_long[index]; + else if (typeof labels[index] !== "undefined") date = labels[index]; - result.push({ - date: date, - value: value, - label: dataObject.label, - }); - }); - } + result.push({ + date: date, + value: value, + label: dataObject.label + }); + }); + } - if (typeof result === "undefined") throw new Error("Empty result"); + if (typeof result === "undefined") throw new Error("Empty result"); - return result; - }; + return result; + }; - try { - var elements = []; - dataObject = retrieveDataOject(dataObjects); - if (dataObject) { - elements.push(processDataObject(dataObject)); - } - dataObjects.forEach(function (element) { - elements.push(processDataObject(element)); - }); - graphData = elements; + try { + var elements = []; + dataObject = retrieveDataOject(dataObjects); + if (dataObject) { + elements.push(processDataObject(dataObject)); + } + dataObjects.forEach(function(element) { + elements.push(processDataObject(element)); + }); + graphData = elements; + // Transform the object data into a string + // cause PHP has limitations in the number + // of POST params received. + var graphDataStr = JSON.stringify(graphData); - // Transform the object data into a string - // cause PHP has limitations in the number - // of POST params received. - var graphDataStr = JSON.stringify(graphData); + // Build form + var $form = $("<form></form>"), + $dataInput = $("<input>"), + $typeInput = $("<input>"), + $separatorInput = $("<input>"), + $excelInput = $("<input>"); - // Build form - var $form = $("<form></form>"), - $dataInput = $("<input>"), - $typeInput = $("<input>"), - $separatorInput = $("<input>"), - $excelInput = $("<input>"); + $dataInput + .prop("name", "data") + .prop("type", "text") + .prop("value", graphDataStr); - $dataInput - .prop("name", "data") - .prop("type", "text") - .prop("value", graphDataStr); + $typeInput + .prop("name", "type") + .prop("type", "text") + .prop("value", type); - $typeInput - .prop("name", "type") - .prop("type", "text") - .prop("value", type); + $separatorInput + .prop("name", "separator") + .prop("type", "text") + .prop("value", ";"); - $separatorInput - .prop("name", "separator") - .prop("type", "text") - .prop("value", ";"); + $excelInput + .prop("name", "excel_encoding") + .prop("type", "text") + .prop("value", 0); - $excelInput - .prop("name", "excel_encoding") - .prop("type", "text") - .prop("value", 0); + $form + .prop("method", "POST") + .prop( + "action", + plot.getOptions().export.homeurl + "include/graphs/export_data.php" + ) + .append($dataInput, $typeInput, $separatorInput, $excelInput) + .hide() + // Firefox made me write into the DOM for this :( + .appendTo("body") + .submit(); + } catch (e) { + alert("There was an error exporting the data"); + } + }; - $form - .prop("method", "POST") - .prop( - "action", - plot.getOptions().export.homeurl + "include/graphs/export_data.php" - ) - .append($dataInput, $typeInput, $separatorInput, $excelInput) - .hide() - // Firefox made me write into the DOM for this :( - .appendTo("body") - .submit(); - } catch (e) { - alert("There was an error exporting the data"); - } - }; + plot.exportDataJSON = function(args) { + //amount = plot.getOptions().export.type, + //options = options || {}; - plot.exportDataJSON = function (args) { - //amount = plot.getOptions().export.type, - //options = options || {}; + // Options + var type = "json"; + type = type.toLowerCase().trim(); - // Options - var type = "json"; - type = type.toLowerCase().trim(); + var graphData, + dataObject, + dataObjects = plot.getData(), + result = []; - var graphData, - dataObject, - dataObjects = plot.getData(), - result = []; + // Throw errors + var retrieveDataOject = function(dataObjects) { + var result; - // Throw errors - var retrieveDataOject = function (dataObjects) { - var result; + if (typeof dataObjects === "undefined") + throw new Error("Empty parameter"); - if (typeof dataObjects === "undefined") - throw new Error("Empty parameter"); + // Try to retrieve the avg set (not 100% reliable, I know) + if (dataObjects.length == 1) { + result = dataObjects.shift(); + } + if (dataObjects.length > 1) { + dataObjects.forEach(function(element) { + if (/^Avg.:/i.test(element.label)) result = element; + }); - // Try to retrieve the avg set (not 100% reliable, I know) - if (dataObjects.length == 1) { - result = dataObjects.shift(); - } - if (dataObjects.length > 1) { - dataObjects.forEach(function (element) { - if (/^Avg.:/i.test(element.label)) result = element; - }); + // If the avg set is missing, retrieve the first set + if (typeof result === "undefined") result = dataObjects.shift(); + } - // If the avg set is missing, retrieve the first set - if (typeof result === "undefined") result = dataObjects.shift(); - } + if (typeof result === "undefined") throw new Error("Empty result"); - if (typeof result === "undefined") throw new Error("Empty result"); + return result; + }; - return result; - }; + // Throw errors + var processDataObject = function(dataObject) { + var result; - // Throw errors - var processDataObject = function (dataObject) { - var result; + if (typeof dataObject === "undefined") + throw new Error("Empty parameter"); - if (typeof dataObject === "undefined") - throw new Error("Empty parameter"); + if ( + typeof dataObject.data === "undefined" || + !(dataObject.data instanceof Array) + ) + throw new Error("Object malformed"); - if ( - typeof dataObject.data === "undefined" || - !(dataObject.data instanceof Array) - ) - throw new Error("Object malformed"); + /* { + * head: [<column>,<column>,...,<column>], + * data: [ + * [<data>,<data>,...,<data>], + * [<data>,<data>,...,<data>], + * ..., + * [<data>,<data>,...,<data>], + * ] + * } + */ + if (type === "csv") { + result = { + head: ["date", "value", "label"], + data: [] + }; - /* { - * head: [<column>,<column>,...,<column>], - * data: [ - * [<data>,<data>,...,<data>], - * [<data>,<data>,...,<data>], - * ..., - * [<data>,<data>,...,<data>], - * ] - * } - */ - if (type === "csv") { - result = { - head: ["date", "value", "label"], - data: [], - }; + dataObject.data.forEach(function(item, index) { + var date = "", + value = item[1]; - dataObject.data.forEach(function (item, index) { - var date = "", - value = item[1]; + // Long labels are preferred + if ( + typeof plot.getOptions().export.labels_long[index] !== "undefined" + ) + date = plot.getOptions().export.labels_long[index]; + else if (typeof labels[index] !== "undefined") date = labels[index]; - // Long labels are preferred - if ( - typeof plot.getOptions().export.labels_long[index] !== "undefined" - ) - date = plot.getOptions().export.labels_long[index]; - else if (typeof labels[index] !== "undefined") date = labels[index]; + result.data.push([date, value, dataObject.label]); + }); + } else if (type === "json") { + /* [ + * { + * 'date': <date>, + * 'value': <value> + * } + * ], + * [ + * { + * 'date': <date>, + * 'value': <value> + * } + * ], + * ..., + * [ + * { + * 'date': <date>, + * 'value': <value> + * } + * ] + */ + result = []; - result.data.push([date, value, dataObject.label]); - }); - } else if (type === "json") { - /* [ - * { - * 'date': <date>, - * 'value': <value> - * } - * ], - * [ - * { - * 'date': <date>, - * 'value': <value> - * } - * ], - * ..., - * [ - * { - * 'date': <date>, - * 'value': <value> - * } - * ] - */ - result = []; + dataObject.data.forEach(function(item, index) { + var date = "", + value = item[1]; - dataObject.data.forEach(function (item, index) { - var date = "", - value = item[1]; + // Long labels are preferred + if (typeof labels_long[index] !== "undefined") + date = labels_long[index]; + else if (typeof labels[index] !== "undefined") date = labels[index]; - // Long labels are preferred - if (typeof labels_long[index] !== "undefined") - date = labels_long[index]; - else if (typeof labels[index] !== "undefined") date = labels[index]; + result.push({ + date: date, + value: value, + label: dataObject.label + }); + }); + } - result.push({ - date: date, - value: value, - label: dataObject.label, - }); - }); - } + if (typeof result === "undefined") throw new Error("Empty result"); - if (typeof result === "undefined") throw new Error("Empty result"); + return result; + }; - return result; - }; + try { + var elements = []; + var custom_graph = $("input:hidden[name=custom_graph]").value; - try { - var elements = []; - var custom_graph = $("input:hidden[name=custom_graph]").value; + if (custom_graph) { + dataObject = retrieveDataOject(dataObjects); + dataObjects.forEach(function(element) { + elements.push(processDataObject(element)); + }); + graphData = elements; + } else { + dataObject = retrieveDataOject(dataObjects); + elements.push(processDataObject(dataObject)); + graphData = elements; + } - if (custom_graph) { - dataObject = retrieveDataOject(dataObjects); - dataObjects.forEach(function (element) { - elements.push(processDataObject(element)); - }); - graphData = elements; - } else { - dataObject = retrieveDataOject(dataObjects); - elements.push(processDataObject(dataObject)); - graphData = elements; - } + // Transform the object data into a string + // cause PHP has limitations in the number + // of POST params received. + var graphDataStr = JSON.stringify(graphData); - // Transform the object data into a string - // cause PHP has limitations in the number - // of POST params received. - var graphDataStr = JSON.stringify(graphData); + // Build form + var $form = $("<form></form>"), + $dataInput = $("<input>"), + $typeInput = $("<input>"), + $separatorInput = $("<input>"), + $excelInput = $("<input>"); - // Build form - var $form = $("<form></form>"), - $dataInput = $("<input>"), - $typeInput = $("<input>"), - $separatorInput = $("<input>"), - $excelInput = $("<input>"); + $dataInput + .prop("name", "data") + .prop("type", "text") + .prop("value", graphDataStr); - $dataInput - .prop("name", "data") - .prop("type", "text") - .prop("value", graphDataStr); + $typeInput + .prop("name", "type") + .prop("type", "text") + .prop("value", type); - $typeInput - .prop("name", "type") - .prop("type", "text") - .prop("value", type); + $separatorInput + .prop("name", "separator") + .prop("type", "text") + .prop("value", ";"); - $separatorInput - .prop("name", "separator") - .prop("type", "text") - .prop("value", ";"); + $excelInput + .prop("name", "excel_encoding") + .prop("type", "text") + .prop("value", 0); - $excelInput - .prop("name", "excel_encoding") - .prop("type", "text") - .prop("value", 0); + $form + .prop("method", "POST") + .prop( + "action", + plot.getOptions().export.homeurl + "include/graphs/export_data.php" + ) + .append($dataInput, $typeInput, $separatorInput, $excelInput) + .hide() + // Firefox made me write into the DOM for this :( + .appendTo("body") + .submit(); + } catch (e) { + alert("There was an error exporting the data"); + } + }; + } - $form - .prop("method", "POST") - .prop( - "action", - plot.getOptions().export.homeurl + "include/graphs/export_data.php" - ) - .append($dataInput, $typeInput, $separatorInput, $excelInput) - .hide() - // Firefox made me write into the DOM for this :( - .appendTo("body") - .submit(); - } catch (e) { - alert("There was an error exporting the data"); - } - }; - } - - $.plot.plugins.push({ - init: init, - options: options, - name: "exportdata", - version: "0.1", - }); + $.plot.plugins.push({ + init: init, + options: options, + name: "exportdata", + version: "0.1" + }); })(jQuery); From edc9038783886c7a964b5d5c24d96a66a35a2d97 Mon Sep 17 00:00:00 2001 From: marcos <marcos.alconada@artica.es> Date: Thu, 29 Oct 2020 10:24:37 +0100 Subject: [PATCH 043/104] Primeras modificaciones del filtro de eventos --- pandora_console/include/ajax/events.php | 62 ++++++++++++++++--- pandora_console/operation/events/events.php | 10 ++- .../operation/events/events_list.php | 3 +- 3 files changed, 63 insertions(+), 12 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 230b55a476..98a965b5f3 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -331,17 +331,49 @@ if ($get_filter_values) { if ($event_filter === false) { $event_filter = [ - 'status' => EVENT_NO_VALIDATED, - 'event_view_hr' => $config['event_view_hr'], - 'group_rep' => 1, - 'tag_with' => [], - 'tag_without' => [], - 'history' => false, + 'status' => EVENT_NO_VALIDATED, + 'event_view_hr' => $config['event_view_hr'], + 'group_rep' => 1, + 'tag_with' => [], + 'tag_without' => [], + 'history' => false, + 'module_search' => '', + 'filter_only_alert' => '-1', + 'user_comment' => '', + 'id_extra' => '', + 'id_user_ack' => '', + 'date_from' => '', + 'date_to' => '', + 'severity' => '', + 'event_type' => '', + 'group_rep' => 0, + 'id_group' => 0, + 'id_group_filter' => 0, + 'group_name' => 'All', + 'text_agent' => '', + 'id_agent' => 0, + 'id_name' => 'None', + 'filter_id' => 0, ]; + } else { + $event_filter['module_search'] = io_safe_output(db_get_value_filter('nombre', 'tagente_modulo', ['id_agente_modulo' => 9])); + $a = array_keys(users_get_groups(false)); + $event_filter['group_name'] = ''; + foreach ($a as $key => $value) { + if ($value == $event_filter['id_group']) { + $event_filter['group_name'] = db_get_value('nombre', 'tgrupo', 'id_grupo', $event_filter['id_group_filter']); + } + } + + $event_filter['module_search'] = io_safe_output(db_get_value_filter('nombre', 'tagente_modulo', ['id_agente_modulo' => 9])); } $event_filter['search'] = io_safe_output($event_filter['search']); $event_filter['id_name'] = io_safe_output($event_filter['id_name']); + $event_filter['text_agent'] = io_safe_output($event_filter['text_agent']); + $event_filter['source'] = io_safe_output($event_filter['source']); + + $event_filter['tag_with'] = base64_encode( io_safe_output($event_filter['tag_with']) ); @@ -435,8 +467,9 @@ function load_form_filter() { jQuery.each (data, function (i, val) { if (i == 'id_name') $("#hidden-id_name").val(val); - if (i == 'id_group') - $("#id_group").val(val); + if (i == 'id_group'){ + $('#id_group').val(val); + } if (i == 'event_type') $("#event_type").val(val); if (i == 'severity') { @@ -446,9 +479,9 @@ function load_form_filter() { if (i == 'status') $("#status").val(val); if (i == 'search') - $("#text-search").val(val); + $('#text-search').val(val); if (i == 'text_agent') - $("#text_id_agent").val(val); + $('input[name=text_agent]').val(val); if (i == 'id_agent') $('input:hidden[name=id_agent]').val(val); if (i == 'id_agent_module') @@ -477,6 +510,15 @@ function load_form_filter() { $("#text-user_comment").val(val); if (i == 'id_source_event') $("#text-id_source_event").val(val); + if(i == 'date_from') + $("#text-date_from").val(val); + if(i == 'date_to') + $("#text-date_to").val(val); + if(i == 'module_search') + $('input[name=module_search]').val(val); + if(i == 'group_name') + $("#select2-id_group_filter-container").text(val); + }); reorder_tags_inputs(); // Update the info with the loaded filter diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 3ca4123b4f..ca323cc263 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -442,6 +442,7 @@ if ($user_filter !== false && $from_event_graph != 1) { $text_agent = $filter['text_agent']; $id_agent = $filter['id_agent']; $id_agent_module = $filter['id_agent_module']; + $text_module = io_safe_output(db_get_value_filter('nombre', 'tagente_modulo', ['id_agente_modulo' => $filter['id_agent_module']])); $pagination = $filter['pagination']; $event_view_hr = $filter['event_view_hr']; $id_user_ack = $filter['id_user_ack']; @@ -878,13 +879,17 @@ if (is_metaconsole() !== true) { */ // Group. +if ($id_group_filter === null) { + $id_group_filter = 0; +} + $data = html_print_input( [ 'name' => 'id_group_filter', 'returnAllGroup' => true, 'privilege' => 'AR', 'type' => 'select_groups', - 'selected' => (defined($id_group_filter) ? $id_group_filter : 0), + 'selected' => $id_group_filter, 'nothing' => false, 'return' => true, 'size' => '80%', @@ -1996,6 +2001,9 @@ function process_datatables_item(item) { /* Group name */ if (item.id_grupo == "0") { + var severity_value = "<?php echo $severity; ?>"; + const multiple = severity_value.split(","); + $("#severity").val(multiple); item.id_grupo = "<?php echo __('All'); ?>"; } else { item.id_grupo = item.group_name; diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index ae39dabf3b..81d4071af1 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -1477,7 +1477,8 @@ $(document).ready( function() { $("#text-id_extra").val(val); if (i == 'user_comment') $("#text-user_comment").val(val); - + if (i == 'module_search') + $("#text-module_search").val(val); if(i == 'id_source_event') $("#text-id_source_event").val(val); } From 6112b3e932e300d3b25ab2c1ae1a29181037ba30 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Thu, 29 Oct 2020 10:55:07 +0100 Subject: [PATCH 044/104] minor fix --- .../godmode/reporting/reporting_builder.item_editor.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index dfdc05c1fc..814e9f1ec4 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -3747,13 +3747,10 @@ $(document).ready (function () { // Alert report group must show all matches when selecting All group // ignoring 'recursion' option. #6497. - if ($('#type').val() == 'alert_report_group' - && $("#combo_group").val() == 0 - ) { + if ($("#combo_group").val() == 0) { $('#checkbox-recursion').attr('disabled',true) $('#checkbox-recursion').attr('checked','checked') } else { - $('#checkbox-recursion').removeAttr('checked') $('#checkbox-recursion').removeAttr('disabled') } From 3e1a89dab782522cfd1df638ac88c5a98a61b2f6 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Thu, 29 Oct 2020 11:21:56 +0100 Subject: [PATCH 045/104] groups_get_cChildren --- pandora_console/include/functions_groups.php | 49 +++++++++++++++----- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index 7b733b9c8d..3248eadb31 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -266,16 +266,21 @@ function groups_check_used($idGroup) /** - * Return a array of id_group of children of given parent. + * Return a array of id_group of children of given parent INCLUDING PARENT!!. * * @param integer $parent The id_grupo parent to search its children. * @param array $ignorePropagate Ignore propagate. * @param string $privilege Default privilege. + * @param boolean $selfInclude Include group "id_parent" in return. * * @return array Of Groups, children of $parent. */ -function groups_get_children($parent, $ignorePropagate=false, $privilege='AR') -{ +function groups_get_children( + $parent, + $ignorePropagate=false, + $privilege='AR', + $selfInclude=true +) { static $groups; static $user_groups; @@ -296,7 +301,15 @@ function groups_get_children($parent, $ignorePropagate=false, $privilege='AR') // Admin see always all groups. $ignorePropagate = users_is_admin() || $ignorePropagate; + // Prepare array. $return = []; + + if ($selfInclude === true) { + if (array_key_exists($parent, $user_groups) === true) { + $return[$parent] = $groups[$parent]; + } + } + foreach ($groups as $key => $g) { if ($g['id_grupo'] == 0) { continue; @@ -317,7 +330,9 @@ function groups_get_children($parent, $ignorePropagate=false, $privilege='AR') if ($g['propagate'] || $ignorePropagate) { $return += groups_get_children( $g['id_grupo'], - $ignorePropagate + $ignorePropagate, + $privilege, + $selfInclude ); } } @@ -490,16 +505,28 @@ function groups_get_all($groupWithAgents=false) /** - * Get all groups recursive from an initial group. + * Get all groups recursive from an initial group INCLUDING PARENT!!. * - * @param int Id of the parent group - * @param bool Whether to force recursive search ignoring propagation (true) or not (false) + * @param integer $id_parent Id of the parent group. + * @param boolean $ignorePropagate Whether to force recursive search ignoring + * propagation (true) or not (false). + * @param boolean $selfInclude Include group "id_parent" in return. + * @param string $privilege Privilege flag to search for default 'AR'. * - * @return array with all result groups + * @return array With all result groups. */ -function groups_get_children_ids($id_parent, $all=false) -{ - $return = groups_get_children($id_parent, $all); +function groups_get_children_ids( + $id_parent, + $ignorePropagate=false, + $selfInclude=true, + $privilege='AR' +) { + $return = groups_get_children( + $id_parent, + $ignorePropagate, + $privilege, + $selfInclude + ); return array_keys($return); } From fe681ba9d78d14a5f52e3ba0f5b86876619af12a Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Thu, 29 Oct 2020 12:13:15 +0100 Subject: [PATCH 046/104] minor style added --- pandora_console/include/styles/pandora.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 6b48ab13ae..6e3df35955 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -462,6 +462,10 @@ select:-internal-list-box { width: 120px; max-width: 120px; } +.w200px { + width: 200px; + max-width: 200px; +} .w240px { width: 240px; max-width: 240px; From cf108c0a17d067b95f32b898eeee75445ec87eee Mon Sep 17 00:00:00 2001 From: marcos <marcos.alconada@artica.es> Date: Thu, 29 Oct 2020 12:30:54 +0100 Subject: [PATCH 047/104] se cambia el valor del modulo y marca en el filtro usado --- pandora_console/include/ajax/events.php | 6 +++--- pandora_console/operation/events/events.php | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 98a965b5f3..dc3759d9c1 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -356,7 +356,7 @@ if ($get_filter_values) { 'filter_id' => 0, ]; } else { - $event_filter['module_search'] = io_safe_output(db_get_value_filter('nombre', 'tagente_modulo', ['id_agente_modulo' => 9])); + $event_filter['module_search'] = io_safe_output(db_get_value_filter('nombre', 'tagente_modulo', ['id_agente_modulo' => $event_filter['id_agent_module']])); $a = array_keys(users_get_groups(false)); $event_filter['group_name'] = ''; foreach ($a as $key => $value) { @@ -365,7 +365,7 @@ if ($get_filter_values) { } } - $event_filter['module_search'] = io_safe_output(db_get_value_filter('nombre', 'tagente_modulo', ['id_agente_modulo' => 9])); + $event_filter['module_search'] = io_safe_output(db_get_value_filter('nombre', 'tagente_modulo', ['id_agente_modulo' => $event_filter['id_agent_module']])); } $event_filter['search'] = io_safe_output($event_filter['search']); @@ -385,7 +385,7 @@ if ($get_filter_values) { } if ($load_filter_modal) { - $current = get_parameter('current_filter', ''); + $current = db_get_value_filter('default_event_filter', 'tusuario', ['id_user' => $config['id_user']]); $filters = events_get_event_filter_select(); $user_groups_array = users_get_groups_for_select( $config['id_user'], diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index ca323cc263..fcf8a5bb36 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -2328,9 +2328,8 @@ $(document).ready( function() { url: '<?php echo ui_get_full_url('ajax.php'); ?>', data: { page: 'include/ajax/events', - load_filter_modal: 1, - current_filter: $('#latest_filter_id').val() - }, + load_filter_modal: 1 + }, success: function (data){ $('#load-modal-filter') .empty() From 43ca5e4972ef2f2fe80679e8b96831c142ab7add Mon Sep 17 00:00:00 2001 From: Daniel Maya <daniel.maya@artica.es> Date: Thu, 29 Oct 2020 12:53:09 +0100 Subject: [PATCH 048/104] =?UTF-8?q?Ent=206482=20fallo=20en=20la=20agrupaci?= =?UTF-8?q?=C3=B3n=20de=20eventos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pandora_console/include/functions_events.php | 6 +++++- pandora_console/operation/events/events.php | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index cf486b8acf..7b598f7ab2 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1244,7 +1244,11 @@ function events_get_all( // Order. $order_by = ''; if (isset($order, $sort_field)) { - $order_by = events_get_sql_order($sort_field, $order); + if (isset($filter['group_rep']) && $filter['group_rep'] == 1) { + $order_by = events_get_sql_order('MAX('.$sort_field.')', $order); + } else { + $order_by = events_get_sql_order($sort_field, $order); + } } // Pagination. diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 3ca4123b4f..05f244d727 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -358,6 +358,21 @@ if (is_ajax()) { $tmp->comments = ui_print_comments($tmp->comments); } + // Show last event. + if (isset($tmp->max_id_evento) && $tmp->max_id_evento !== $tmp->id_evento) { + $max_event = db_get_row_sql( + sprintf( + 'SELECT criticity, timestamp FROM %s + WHERE id_evento = %s', + ($tmp->meta) ? 'tmetaconsole_event' : 'tevento', + $tmp->max_id_evento + ) + ); + + $tmp->timestamp = $max_event['timestamp']; + $tmp->criticity = $max_event['criticity']; + } + $tmp->agent_name = io_safe_output($tmp->agent_name); $tmp->ack_utimestamp = ui_print_timestamp( $tmp->ack_utimestamp, From 98a04bfcf8caebaf9622c7649d12fdccd40ccc25 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Thu, 29 Oct 2020 12:55:44 +0100 Subject: [PATCH 049/104] omg... what a file --- .../operation/agentes/status_monitor.php | 170 +++++++++++++----- 1 file changed, 122 insertions(+), 48 deletions(-) diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 7be62557f4..db1e052ab9 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -1,6 +1,5 @@ <?php - - +// This file is an example on how things must NEVER be done. // Pandora FMS - http://pandorafms.com // ================================================== // Copyright (c) 2005-2010 Artica Soluciones Tecnologicas @@ -41,7 +40,7 @@ if (! defined('METACONSOLE')) { $buttons['fields'] = [ 'active' => false, - 'text' => '<a href="index.php?sec=view&sec2=operation/agentes/status_monitor&section=fields">'.html_print_image('images/custom_columns.png', true, ['title' => __('Custom fields')]).'</a>', + 'text' => '<a href="index.php?sec=view&sec2=operation/agentes/status_monitor§ion=fields">'.html_print_image('images/custom_columns.png', true, ['title' => __('Custom fields')]).'</a>', 'operation' => true, ]; @@ -79,22 +78,27 @@ if (! defined('METACONSOLE')) { ui_meta_print_header(__('Monitor view')); } -$ag_freestring = (string) get_parameter('ag_freestring'); -$moduletype = (string) get_parameter('moduletype'); -$datatype = (string) get_parameter('datatype'); -$ag_modulename = (string) get_parameter('ag_modulename'); -$refr = (int) get_parameter('refr', 0); -$offset = (int) get_parameter('offset', 0); -$status = (int) get_parameter('status', 4); -$modulegroup = (int) get_parameter('modulegroup', -1); -$tag_filter = (int) get_parameter('tag_filter', 0); -$min_hours_status = (string) get_parameter('min_hours_status', ''); -// Sort functionality -$sortField = get_parameter('sort_field'); -$sort = get_parameter('sort', 'none'); -// When the previous page was a visualmap and show only one module -$id_module = (int) get_parameter('id_module', 0); -$ag_custom_fields = (array) get_parameter('ag_custom_fields', []); +$recursion = get_parameter_switch('recursion', false); +if ($recursion === false) { + $recursion = get_parameter('recursion', false); +} + +$ag_freestring = (string) get_parameter('ag_freestring'); +$moduletype = (string) get_parameter('moduletype'); +$datatype = (string) get_parameter('datatype'); +$ag_modulename = (string) get_parameter('ag_modulename'); +$refr = (int) get_parameter('refr', 0); +$offset = (int) get_parameter('offset', 0); +$status = (int) get_parameter('status', 4); +$modulegroup = (int) get_parameter('modulegroup', -1); +$tag_filter = (int) get_parameter('tag_filter', 0); +$min_hours_status = (string) get_parameter('min_hours_status', ''); +// Sort functionality. +$sortField = get_parameter('sort_field'); +$sort = get_parameter('sort', 'none'); +// When the previous page was a visualmap and show only one module. +$id_module = (int) get_parameter('id_module', 0); +$ag_custom_fields = (array) get_parameter('ag_custom_fields', []); $module_option = (int) get_parameter('module_option', 1); $autosearch = false; @@ -161,11 +165,22 @@ if (is_numeric($ag_group)) { // Agent group selector if (!is_metaconsole()) { if ($ag_group > 0 && check_acl($config['id_user'], $ag_group, 'AR')) { - $sql_conditions_group = sprintf( - ' AND (tagente.id_grupo = %d OR tasg.id_group = %d)', - $ag_group, - $ag_group - ); + if ($recursion) { + $all_groups = groups_get_children_ids($ag_group, true); + + // User has explicit permission on group 1 ? + $sql_conditions_group = sprintf( + ' AND (tagente.id_grupo IN (%s) OR tasg.id_group IN (%s)) ', + implode(',', $all_groups), + implode(',', $all_groups) + ); + } else { + $sql_conditions_group = sprintf( + ' AND (tagente.id_grupo = %d OR tasg.id_group = %d)', + $ag_group, + $ag_group + ); + } } else if ($user_groups != '') { // User has explicit permission on group 1 ? $sql_conditions_group = ' AND ( @@ -175,11 +190,22 @@ if (!is_metaconsole()) { } } else { if (((int) $ag_group !== 0) && (check_acl($config['id_user'], $id_ag_group, 'AR'))) { - $sql_conditions_group = sprintf( - ' AND (tagente.id_grupo IN (%s) OR tasg.id_group IN (%s))', - $ag_group, - $ag_group - ); + if ($recursion) { + $all_groups = groups_get_children_ids($ag_group, true); + + // User has explicit permission on group 1 ? + $sql_conditions_group = sprintf( + ' AND (tagente.id_grupo IN (%s) OR tasg.id_group IN (%s)) ', + implode(',', $all_groups), + implode(',', $all_groups) + ); + } else { + $sql_conditions_group = sprintf( + ' AND (tagente.id_grupo IN (%s) OR tasg.id_group IN (%s))', + $ag_group, + $ag_group + ); + } } else if ($user_groups != '') { // User has explicit permission on group 1 ? $sql_conditions_group = ' AND ( @@ -355,7 +381,8 @@ $table->style[3] = 'font-weight: bold;'; $table->style[4] = 'font-weight: bold;'; $table->data[0][0] = __('Group'); -$table->data[0][1] = html_print_select_groups( +$table->data[0][1] = '<div class="flex flex-row-vcenter w290px"><div class="w200px">'; +$table->data[0][1] .= html_print_select_groups( $config['id_user'], 'AR', true, @@ -375,6 +402,18 @@ $table->data[0][1] = html_print_select_groups( 'id_grupo', false ); +$table->data[0][1] .= '</div><div>'; +$table->data[0][1] .= html_print_input( + [ + 'type' => 'checkbox', + 'name' => 'recursion', + 'return' => true, + 'checked' => $recursion, + 'value' => 1, + ] +); +$table->data[0][1] .= __('Recursion'); +$table->data[0][1] .= '</div></div>'; $fields = []; $fields[AGENT_MODULE_STATUS_NORMAL] = __('Normal'); @@ -701,7 +740,7 @@ foreach ($custom_fields as $custom_field) { $table_custom_fields->data[] = $row; } -$filters = '<form method="post" action="index.php?sec=view&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params.'">'; +$filters = '<form method="post" action="index.php?sec=view&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params.'">'; if (is_metaconsole()) { $table->colspan[4][0] = 7; $table->cellstyle[4][0] = 'padding: 10px;'; @@ -969,7 +1008,7 @@ switch ($sortField) { } $sql = 'SELECT - (SELECT GROUP_CONCAT(ttag.name SEPARATOR \',\') + (SELECT GROUP_CONCAT(ttag.name SEPARATOR \',\') FROM ttag WHERE ttag.id_tag IN ( SELECT ttag_module.id_tag @@ -1013,6 +1052,7 @@ $sql = 'SELECT ORDER BY '.$order['field'].' '.$order['order'].' LIMIT '.$offset.','.$limit_sql; + // We do not show the modules until the user searches with the filter if ($autosearch) { if (! defined('METACONSOLE')) { @@ -1101,17 +1141,51 @@ if (($config['dbtype'] == 'oracle') && ($result !== false)) { // Urls to sort the table. -$url_agent_name = 'index.php?sec=view&sec2=operation/agentes/status_monitor&refr='.$refr.'&datatype='.$datatype.'&moduletype='.$moduletype.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params.'&sort_field=agent_alias&sort='; -$url_type = 'index.php?sec=view&sec2=operation/agentes/status_monitor&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params.'&sort_field=type&sort='; -$url_module_name = 'index.php?sec=view&sec2=operation/agentes/status_monitor&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params.'&sort_field=module_name&sort='; -$url_server_type = 'index.php?sec=view&sec2=operation/agentes/status_monitor&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params.'&sort_field=moduletype&sort='; -$url_interval = 'index.php?sec=view&sec2=operation/agentes/status_monitor&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params.'&sort_field=interval&sort='; -$url_status = 'index.php?sec=view&sec2=operation/agentes/status_monitor&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params.'&sort_field=status&sort='; -$url_status = 'index.php?sec=view&sec2=operation/agentes/status_monitor&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params.'&sort_field=last_status_change&sort='; -$url_data = 'index.php?sec=view&sec2=operation/agentes/status_monitor&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params.'&sort_field=data&sort='; -$url_timestamp_up = 'index.php?sec=view&sec2=operation/agentes/status_monitor&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params.'&sort_field=timestamp&sort=up'; -$url_timestamp_down = 'index.php?sec=view&sec2=operation/agentes/status_monitor&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params.'&sort_field=timestamp&sort=down'; +$url_agent_name = 'index.php?sec=view&sec2=operation/agentes/status_monitor'; +$url_type = 'index.php?sec=view&sec2=operation/agentes/status_monitor'; +$url_module_name = 'index.php?sec=view&sec2=operation/agentes/status_monitor'; +$url_server_type = 'index.php?sec=view&sec2=operation/agentes/status_monitor'; +$url_interval = 'index.php?sec=view&sec2=operation/agentes/status_monitor'; +$url_status = 'index.php?sec=view&sec2=operation/agentes/status_monitor'; +$url_status = 'index.php?sec=view&sec2=operation/agentes/status_monitor'; +$url_data = 'index.php?sec=view&sec2=operation/agentes/status_monitor'; +$url_timestamp_up = 'index.php?sec=view&sec2=operation/agentes/status_monitor'; +$url_timestamp_down = 'index.php?sec=view&sec2=operation/agentes/status_monitor'; +$url_agent_name .= '&refr='.$refr.'&datatype='.$datatype.'&moduletype='.$moduletype.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params; +$url_type .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params; +$url_module_name .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params; +$url_server_type .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params; +$url_interval .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params; +$url_status .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params; +$url_status .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params; +$url_data .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params; +$url_timestamp_up .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params; +$url_timestamp_down .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params; + +// Holy god... +$url_agent_name .= '&recursion='.$recursion; +$url_type .= '&recursion='.$recursion; +$url_module_name .= '&recursion='.$recursion; +$url_server_type .= '&recursion='.$recursion; +$url_interval .= '&recursion='.$recursion; +$url_status .= '&recursion='.$recursion; +$url_status .= '&recursion='.$recursion; +$url_data .= '&recursion='.$recursion; +$url_timestamp_up .= '&recursion='.$recursion; +$url_timestamp_down .= '&recursion='.$recursion; + + +$url_agent_name .= '&sort_field=agent_alias&sort='; +$url_type .= '&sort_field=type&sort='; +$url_module_name .= '&sort_field=module_name&sort='; +$url_server_type .= '&sort_field=moduletype&sort='; +$url_interval .= '&sort_field=interval&sort='; +$url_status .= '&sort_field=status&sort='; +$url_status .= '&sort_field=last_status_change&sort='; +$url_data .= '&sort_field=data&sort='; +$url_timestamp_up .= '&sort_field=timestamp&sort=up'; +$url_timestamp_down .= '&sort_field=timestamp&sort=down'; // Start Build List Result if (!empty($result)) { @@ -1275,9 +1349,9 @@ if (!empty($result)) { } if (is_metaconsole()) { - $data[0] = '<a href="?sec=gmodules&sec2=advanced/policymanager&id='.$policyInfo['id_policy'].'">'.html_print_image($img, true, ['title' => $title]).'</a>'; + $data[0] = '<a href="?sec=gmodules&sec2=advanced/policymanager&id='.$policyInfo['id_policy'].'">'.html_print_image($img, true, ['title' => $title]).'</a>'; } else { - $data[0] = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id='.$policyInfo['id_policy'].'">'.html_print_image($img, true, ['title' => $title]).'</a>'; + $data[0] = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id='.$policyInfo['id_policy'].'">'.html_print_image($img, true, ['title' => $title]).'</a>'; } } @@ -1292,7 +1366,7 @@ if (!empty($result)) { // TODO: Calculate hash access before to use it more simply like other sections. I.E. Events view if (defined('METACONSOLE')) { - $agent_link = '<a href="'.$row['server_url'].'index.php?'.'sec=estado&'.'sec2=operation/agentes/ver_agente&'.'id_agente='.$row['id_agent'].'&'.'loginhash=auto&'.'loginhash_data='.$row['hashdata'].'&'.'loginhash_user='.str_rot13($row['user']).'">'; + $agent_link = '<a href="'.$row['server_url'].'index.php?'.'sec=estado&'.'sec2=operation/agentes/ver_agente&'.'id_agente='.$row['id_agent'].'&'.'loginhash=auto&'.'loginhash_data='.$row['hashdata'].'&'.'loginhash_user='.str_rot13($row['user']).'">'; $agent_alias = ui_print_truncate_text( $agent_alias, 'agent_small', @@ -1308,7 +1382,7 @@ if (!empty($result)) { $data[1] = $agent_alias; } } else { - $data[1] = '<strong><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$row['id_agent'].'">'; + $data[1] = '<strong><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$row['id_agent'].'">'; $data[1] .= ui_print_truncate_text($agent_alias, 'agent_medium', false, true, false, '[…]', 'font-size:7.5pt;'); $data[1] .= '</a></strong>'; } @@ -1324,9 +1398,9 @@ if (!empty($result)) { $show_edit_icon = false; } - $url_edit_module = $row['server_url'].'index.php?'.'sec=gagente&'.'sec2=godmode/agentes/configurar_agente&'.'id_agente='.$row['id_agent'].'&'.'tab=module&'.'id_agent_module='.$row['id_agente_modulo'].'&'.'edit_module=1'.'&loginhash=auto&loginhash_data='.$row['hashdata'].'&loginhash_user='.str_rot13($row['user']); + $url_edit_module = $row['server_url'].'index.php?'.'sec=gagente&'.'sec2=godmode/agentes/configurar_agente&'.'id_agente='.$row['id_agent'].'&'.'tab=module&'.'id_agent_module='.$row['id_agente_modulo'].'&'.'edit_module=1'.'&loginhash=auto&loginhash_data='.$row['hashdata'].'&loginhash_user='.str_rot13($row['user']); } else { - $url_edit_module = 'index.php?'.'sec=gagente&'.'sec2=godmode/agentes/configurar_agente&'.'id_agente='.$row['id_agent'].'&'.'tab=module&'.'id_agent_module='.$row['id_agente_modulo'].'&'.'edit_module=1'; + $url_edit_module = 'index.php?'.'sec=gagente&'.'sec2=godmode/agentes/configurar_agente&'.'id_agente='.$row['id_agent'].'&'.'tab=module&'.'id_agent_module='.$row['id_agente_modulo'].'&'.'edit_module=1'; } if ($show_edit_icon) { From 6bcca915ba97cad4bce575113e04e13bce03b59e Mon Sep 17 00:00:00 2001 From: marcos <marcos.alconada@artica.es> Date: Thu, 29 Oct 2020 14:57:54 +0100 Subject: [PATCH 050/104] resuelto el error que vaciaba el module search --- pandora_console/godmode/events/event_edit_filter.php | 10 +++++++++- pandora_console/include/ajax/events.php | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/events/event_edit_filter.php b/pandora_console/godmode/events/event_edit_filter.php index 56201e3a28..f014226e21 100644 --- a/pandora_console/godmode/events/event_edit_filter.php +++ b/pandora_console/godmode/events/event_edit_filter.php @@ -130,7 +130,15 @@ if ($update || $create) { $id_agent = (int) get_parameter('id_agent'); $text_module = get_parameter('text_module', ''); $id_agent_module = (int) get_parameter('module_search_hidden'); - $pagination = get_parameter('pagination', ''); + if ($text_module === '') { + $text_module = io_safe_output( + db_get_value_filter( + 'nombre', + 'tagente_modulo', + ['id_agente_modulo' => $id_agent_module] + ) + ); + } $pagination = get_parameter('pagination', ''); $event_view_hr = get_parameter('event_view_hr', ''); $id_user_ack = get_parameter('id_user_ack', ''); $group_rep = get_parameter('group_rep', ''); diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index dc3759d9c1..7b44e7e396 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -362,6 +362,9 @@ if ($get_filter_values) { foreach ($a as $key => $value) { if ($value == $event_filter['id_group']) { $event_filter['group_name'] = db_get_value('nombre', 'tgrupo', 'id_grupo', $event_filter['id_group_filter']); + if ($event_filter['group_name'] === false) { + $event_filter['group_name'] = __('All'); + } } } @@ -465,6 +468,7 @@ function load_form_filter() { }, function (data) { jQuery.each (data, function (i, val) { + console.log(val); if (i == 'id_name') $("#hidden-id_name").val(val); if (i == 'id_group'){ From 765d37d4e9337b03cea1f5a36085728c03f08edc Mon Sep 17 00:00:00 2001 From: marcos <marcos.alconada@artica.es> Date: Thu, 29 Oct 2020 15:06:01 +0100 Subject: [PATCH 051/104] formato funcion --- pandora_console/operation/events/events.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index fcf8a5bb36..81707a6837 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -429,7 +429,7 @@ $user_filter = db_get_row_sql( ) ); -// Do not load the user filter if we come from the 24h event graph +// Do not load the user filter if we come from the 24h event graph. $from_event_graph = get_parameter('filter[from_event_graph]', $filter['from_event_graph']); if ($user_filter !== false && $from_event_graph != 1) { $filter = events_get_event_filter($user_filter['id_filter']); @@ -442,7 +442,13 @@ if ($user_filter !== false && $from_event_graph != 1) { $text_agent = $filter['text_agent']; $id_agent = $filter['id_agent']; $id_agent_module = $filter['id_agent_module']; - $text_module = io_safe_output(db_get_value_filter('nombre', 'tagente_modulo', ['id_agente_modulo' => $filter['id_agent_module']])); + $text_module = io_safe_output( + db_get_value_filter( + 'nombre', + 'tagente_modulo', + ['id_agente_modulo' => $filter['id_agent_module']] + ) + ); $pagination = $filter['pagination']; $event_view_hr = $filter['event_view_hr']; $id_user_ack = $filter['id_user_ack']; From b972bc627a633aba085f998e2555935349a6b4b0 Mon Sep 17 00:00:00 2001 From: Marcos Alconada <marcos.alconada@artica.es> Date: Thu, 29 Oct 2020 15:04:53 +0100 Subject: [PATCH 052/104] Update event_edit_filter.php --- pandora_console/godmode/events/event_edit_filter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/events/event_edit_filter.php b/pandora_console/godmode/events/event_edit_filter.php index f014226e21..5783797112 100644 --- a/pandora_console/godmode/events/event_edit_filter.php +++ b/pandora_console/godmode/events/event_edit_filter.php @@ -138,7 +138,8 @@ if ($update || $create) { ['id_agente_modulo' => $id_agent_module] ) ); - } $pagination = get_parameter('pagination', ''); + } + $pagination = get_parameter('pagination', ''); $event_view_hr = get_parameter('event_view_hr', ''); $id_user_ack = get_parameter('id_user_ack', ''); $group_rep = get_parameter('group_rep', ''); From f8511de008fa2a341dee4a071fdad41a6de4b6fc Mon Sep 17 00:00:00 2001 From: Marcos Alconada <marcos.alconada@artica.es> Date: Thu, 29 Oct 2020 16:39:00 +0100 Subject: [PATCH 053/104] fixed error 6495 --- pandora_console/godmode/servers/modificar_server.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/servers/modificar_server.php b/pandora_console/godmode/servers/modificar_server.php index 9062eab0a4..d7332b86b4 100644 --- a/pandora_console/godmode/servers/modificar_server.php +++ b/pandora_console/godmode/servers/modificar_server.php @@ -140,7 +140,7 @@ if (isset($_GET['server'])) { ui_print_error_message(__('There was a problem deleting the server')); } } else if (isset($_GET['update'])) { - $address = trim(get_parameter_post('address'), ' '); + $address = trim(io_safe_output(get_parameter_post('address')), ' '); $description = trim(get_parameter_post('description'), ' '); $id_server = get_parameter_post('server'); $exec_proxy = get_parameter_post('exec_proxy'); From 785e187f5cf475ab6e6d6055396d2a6783f37eba Mon Sep 17 00:00:00 2001 From: Daniel Maya <daniel.maya@artica.es> Date: Thu, 29 Oct 2020 17:22:02 +0100 Subject: [PATCH 054/104] Fixed special characters --- pandora_console/include/functions_io.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_console/include/functions_io.php b/pandora_console/include/functions_io.php index 6390f78f96..336e9480dd 100755 --- a/pandora_console/include/functions_io.php +++ b/pandora_console/include/functions_io.php @@ -116,6 +116,13 @@ function io_safe_input($value) // TICKET: 1223 $valueHtmlEncode = str_replace('°', '°', $valueHtmlEncode); + // Fixed the ¿ charater. + $valueHtmlEncode = str_replace('¿', '¿', $valueHtmlEncode); + // Fixed the ¡ charater. + $valueHtmlEncode = str_replace('¡', '¡', $valueHtmlEncode); + // Fixed the € charater. + $valueHtmlEncode = str_replace('€', '€', $valueHtmlEncode); + // Replace some characteres for html entities for ($i = 0; $i < 33; $i++) { $valueHtmlEncode = str_ireplace( From 26e809dc37ec530d43b9f306e93f406cca52f827 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Thu, 29 Oct 2020 17:53:34 +0100 Subject: [PATCH 055/104] fix group alert report --- pandora_console/include/functions_alerts.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index 2566e265be..5f3731164d 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -2871,17 +2871,8 @@ function alerts_get_agent_modules( ); $agent_modules = db_get_all_rows_sql($sql); } else { - $groups = groups_get_children($id_grupo, true); - if (empty($groups) === false) { - $groups = array_reduce( - $groups, - function ($carry, $item) { - $carry[] = $item['id_grupo']; - return $carry; - }, - [$id_grupo] - ); - + $groups = groups_get_children_ids($id_grupo, true); + if (count($groups) > 1) { $sql = sprintf( 'SELECT distinct(atm.id_agent_module) FROM talert_template_modules atm From 742cbcb5c599e8071a3272b2882e61be6552967e Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Thu, 29 Oct 2020 17:54:40 +0100 Subject: [PATCH 056/104] fix group alert report --- pandora_console/include/functions_alerts.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index 2566e265be..5f3731164d 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -2871,17 +2871,8 @@ function alerts_get_agent_modules( ); $agent_modules = db_get_all_rows_sql($sql); } else { - $groups = groups_get_children($id_grupo, true); - if (empty($groups) === false) { - $groups = array_reduce( - $groups, - function ($carry, $item) { - $carry[] = $item['id_grupo']; - return $carry; - }, - [$id_grupo] - ); - + $groups = groups_get_children_ids($id_grupo, true); + if (count($groups) > 1) { $sql = sprintf( 'SELECT distinct(atm.id_agent_module) FROM talert_template_modules atm From c4d9c0851ab98ab10f6f6b86c9e04c9c25800c0b Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Thu, 29 Oct 2020 18:08:02 +0100 Subject: [PATCH 057/104] safe output in _event_date_ (custom responses) --- pandora_console/include/functions_events.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 10eb6bf82d..77b1552989 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -6988,7 +6988,9 @@ function events_get_field_value_by_event_id( if (strpos($value, '_event_date_') !== false) { $value = str_replace( '_event_date_', - date($config['date_format'], $event['utimestamp']), + io_safe_output( + date($config['date_format'], $event['utimestamp']) + ), $value ); } From 8e4c62a0e9cbf3f67967f40b4841ba4e01b03290 Mon Sep 17 00:00:00 2001 From: Marcos Alconada <marcos.alconada@artica.es> Date: Thu, 29 Oct 2020 18:20:33 +0100 Subject: [PATCH 058/104] fixed error --- pandora_console/extras/mr/42.sql | 2 ++ pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 1 + pandora_console/include/javascript/pandora.js | 3 +-- pandora_console/pandoradb_data.sql | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pandora_console/extras/mr/42.sql b/pandora_console/extras/mr/42.sql index 26f20e0f0a..f4bed54d16 100644 --- a/pandora_console/extras/mr/42.sql +++ b/pandora_console/extras/mr/42.sql @@ -31,4 +31,6 @@ ALTER TABLE `treport` ADD COLUMN `index_render` tinyint(1) NOT NULL DEFAULT 1; ALTER TABLE `treport_template` ADD COLUMN `cover_page_render` tinyint(1) NOT NULL DEFAULT 1; ALTER TABLE `treport_template` ADD COLUMN `index_render` tinyint(1) NOT NULL DEFAULT 1; +UPDATE `tconfig` SET value = '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.00097656250000":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}' WHERE token = 'post_process_custom_values'; + COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 664a7749e1..b1e8f60aad 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1405,6 +1405,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_type', ''); INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_status', ''); INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_title', ''); INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_content', ''); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.00097656250000":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'); -- --------------------------------------------------------------------- -- Table `tconfig_os` diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index f99ae01c79..e7f007a425 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -786,13 +786,12 @@ function post_process_select_events_unit(name, selected) { function post_process_select_events(name) { $("." + name + "_toggler").click(function() { var value = $("#text-" + name + "_text").val(); - var count = $("#" + name + "_select option").filter(function(i, item) { if (Number($(item).val()) == Number(value)) return true; else return false; }).length; - if (count != 1) { + if (count < 1) { $("#" + name + "_select").append( $("<option>") .val(value) diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index ad20052428..53b1a1027f 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -113,7 +113,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('identification_reminder', 1), ('identification_reminder_timestamp', 0), ('current_package_enterprise', 750), -('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'), +('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.00097656250000":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'), ('custom_docs_logo', 'default_docs.png'), ('custom_support_logo', 'default_support.png'), ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png'), @@ -2747,4 +2747,4 @@ SELECT @plugin_id := `id` FROM `tplugin` WHERE `name` = @plugin_name; INSERT IGNORE INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `ff_type`, `each_ff`, `dynamic_interval`, `dynamic_max`, `dynamic_min`, `dynamic_next`, `dynamic_two_tailed`, `module_type`, `protocol`, `manufacturer_id`, `execution_type`, `scan_type`, `value`, `value_operations`, `module_enabled`, `name_oid`, `query_class`, `query_key_field`, `scan_filters`, `query_filters`, `enabled`) VALUES (@component_id,@component_name,@component_description,@group_id,1,0,0,0,0,'','','','',0,9,0,'','','',0,0,0,80.00,90.00,'',90.00,0.00,'',0,'','','',0,0,0.000000000000000,'%','nowizard',CONCAT('{\"extra_field_1\":\"Size\",\"extra_field_2\":\"FreeSpace\",\"satellite_execution\":\"/etc/pandora/satellite_plugins/wizard_wmi_module -host "_address_" -namespace "_namespace_wmi_" -user "_user_wmi_" -pass "_pass_wmi_" -wmiClass "_class_wmi_" -fieldsList "_field_wmi_1_,_field_wmi_2_" -queryFilter "DeviceID = '_DeviceID_'" -operation "((_f1_ - _f2_) * 100) / _f1_" -wmicPath /usr/bin/wmic\",\"value_operation\":\"((_Size_ - _FreeSpace_) * 100) / _Size_\",\"server_plugin\":\"',@plugin_id,'\",\"_field2__wmi_field\":\"_namespace_wmi_\",\"_field1__wmi_field\":\"_address_\",\"_field4__wmi_field\":\"_pass_wmi_\",\"_field3__wmi_field\":\"_user_wmi_\",\"_field6__wmi_field\":\"_field_wmi_1_,_field_wmi_2_\",\"_field5__wmi_field\":\"_class_wmi_\",\"_field8__wmi_field\":\"((_f1_ - _f2_) * 100) / _f1_\",\"_field7__wmi_field\":\"DeviceID = '_DeviceID_'\",\"field0_wmi_field\":\"\"}'),'','','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,1,'wmi','',2,2,'','',1,'','Win32_LogicalDisk','DeviceID','','{\"scan\":\"DriveType = 3\",\"execution\":\"\",\"field\":\"\",\"key_string\":\"\"}',1); -INSERT IGNORE INTO `tpen` VALUES (171,'dlink','D-Link Systems, Inc.'),(14988,'mikrotik','MikroTik'),(6486,'alcatel','Alcatel-Lucent Enterprise'),(41112,'ubiquiti','Ubiquiti Networks, Inc.'),(207,'telesis','Allied Telesis, Inc.'),(10002,'frogfoot','Frogfoot Networks'),(2,'ibm','IBM'),(4,'unix','Unix'),(63,'apple','Apple Computer, Inc.'),(674,'dell','Dell Inc.'),(111,'oracle','Oracle'),(116,'hitachi','Hitachi, Ltd.'),(173,'netlink','Netlink'),(188,'ascom','Ascom'),(6574,'synology','Synology Inc.'),(3861,'fujitsu','Fujitsu Network Communications, Inc.'),(53526,'dell','Dell ATC'),(52627,'apple','Apple Inc'),(19464,'hitachi','Hitachi Communication Technologies, Ltd.'),(13062,'ascom','Ascom'); \ No newline at end of file +INSERT IGNORE INTO `tpen` VALUES (171,'dlink','D-Link Systems, Inc.'),(14988,'mikrotik','MikroTik'),(6486,'alcatel','Alcatel-Lucent Enterprise'),(41112,'ubiquiti','Ubiquiti Networks, Inc.'),(207,'telesis','Allied Telesis, Inc.'),(10002,'frogfoot','Frogfoot Networks'),(2,'ibm','IBM'),(4,'unix','Unix'),(63,'apple','Apple Computer, Inc.'),(674,'dell','Dell Inc.'),(111,'oracle','Oracle'),(116,'hitachi','Hitachi, Ltd.'),(173,'netlink','Netlink'),(188,'ascom','Ascom'),(6574,'synology','Synology Inc.'),(3861,'fujitsu','Fujitsu Network Communications, Inc.'),(53526,'dell','Dell ATC'),(52627,'apple','Apple Inc'),(19464,'hitachi','Hitachi Communication Technologies, Ltd.'),(13062,'ascom','Ascom'); From 45e8efa089ec515370e498397d94354f2a35c064 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Thu, 29 Oct 2020 18:47:34 +0100 Subject: [PATCH 059/104] minor fix --- pandora_console/include/functions_alerts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index 5f3731164d..74a024d866 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -2872,7 +2872,7 @@ function alerts_get_agent_modules( $agent_modules = db_get_all_rows_sql($sql); } else { $groups = groups_get_children_ids($id_grupo, true); - if (count($groups) > 1) { + if (empty($groups) === false) { $sql = sprintf( 'SELECT distinct(atm.id_agent_module) FROM talert_template_modules atm From 8c92e5420d1d7c1e99e0b609dc606e2f3655ca2b Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Fri, 30 Oct 2020 01:00:21 +0100 Subject: [PATCH 060/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index bb54c56b4c..aee5645947 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201029 +Version: 7.0NG.750-201030 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 7e6e85035c..ebd275a094 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201029" +pandora_version="7.0NG.750-201030" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index d55e379f01..3205d7b83a 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201029'; +use constant AGENT_BUILD => '201030'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 698b2439d2..e4dd2984b0 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201029 +%define release 201030 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 8d18a817fe..c25a116188 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201029 +%define release 201030 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 81a292285e..90857b204a 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201029" +PI_BUILD="201030" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f6493723fd..1d96fa16cd 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201029} +{201030} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index bac75d8cd5..c12b388dfe 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201029)") +#define PANDORA_VERSION ("7.0NG.750(Build 201030)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 070d4c6fbd..f8c9df8998 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201029))" + VALUE "ProductVersion", "(7.0NG.750(Build 201030))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 304b66c7a6..4e046ce5a6 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201029 +Version: 7.0NG.750-201030 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index a7ca73a213..1731f3c847 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201029" +pandora_version="7.0NG.750-201030" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e490b8d671..7b8578f503 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201029'; +$build_version = 'PC201030'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index f706f1dff4..7bf0897508 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201029'; + $build = '201030'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 37fa8092c2..d6d7f13e72 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201029 +%define release 201030 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 162aeaef50..f03a5e193a 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201029 +%define release 201030 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index de5a3f753c..15e0ef43a1 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201029 +%define release 201030 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 1afd3bd5bb..010b7b5111 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201029 +Version: 7.0NG.750-201030 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 2aff52280a..cf4ae0cca6 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201029" +pandora_version="7.0NG.750-201030" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 03f3c1e109..cecadd6c18 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201029"; +my $pandora_build = "201030"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 17a8779e7f..f750c10cfc 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201029"; +my $pandora_build = "201030"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 258f820820..95907ab89a 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201029 +%define release 201030 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 7b05aea60c..2b9b8df852 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201029 +%define release 201030 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 2712d24fd2..5c3be71b82 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201029" +PI_BUILD="201030" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index e7a1e7ec12..aaa8bece15 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201029"; +my $version = "7.0NG.750 PS201030"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 80771fd543..6757cebf66 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201029"; +my $version = "7.0NG.750 PS201030"; # save program name for logging my $progname = basename($0); From 2376ef408bcfb66ef38ce9955b4f0f1dad077d33 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Fri, 30 Oct 2020 11:22:39 +0100 Subject: [PATCH 061/104] Update functions_events.php resolve entities for group_name in event responses --- pandora_console/include/functions_events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 77b1552989..4a32fab3c2 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -3761,7 +3761,7 @@ function events_get_response_target( if (strpos($target, '_group_name_') !== false) { $target = str_replace( '_group_name_', - groups_get_name($event['id_grupo'], true), + io_safe_output(groups_get_name($event['id_grupo'], true)), $target ); } From 4e2d5bdf2bccc58bf4ec172ba94277d1143072c0 Mon Sep 17 00:00:00 2001 From: daniel <daniel.barbero@artica.es> Date: Fri, 30 Oct 2020 13:23:47 +0100 Subject: [PATCH 062/104] fix counter groups child --- .../include/javascript/tree/TreeController.js | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/javascript/tree/TreeController.js b/pandora_console/include/javascript/tree/TreeController.js index 497e18c266..1aeb7ad799 100644 --- a/pandora_console/include/javascript/tree/TreeController.js +++ b/pandora_console/include/javascript/tree/TreeController.js @@ -12,6 +12,8 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. +/*global $, _*/ + var TreeController = { controllers: [], getController: function() { @@ -38,12 +40,35 @@ var TreeController = { return; } + function _recursiveGroupsCount(elements, childGroupsLength) { + if (typeof childGroupsLength === "undefined") { + childGroupsLength = 0; + } + + _.each(elements, function(element) { + if (typeof element.children !== "undefined") { + childGroupsLength = _recursiveGroupsCount( + element.children, + childGroupsLength + ); + childGroupsLength += element.children.length; + } + }); + return childGroupsLength; + } + // Load branch function _processGroup(container, elements, rootGroup) { var $group = $("<ul></ul>"); + var childGroupsLength = _recursiveGroupsCount(elements); - // First group + // First group. if (typeof rootGroup != "undefined" && rootGroup == true) { + var messageLength = controller.tree.length; + if (childGroupsLength > 0) { + messageLength = childGroupsLength + controller.tree.length; + } + $group .addClass("tree-root") .hide() @@ -54,13 +79,12 @@ var TreeController = { 'images/pandora.png" />' + "<span class='margin-left-1'>" + (controller.tree.length > 0 - ? controller.foundMessage + ": " + controller.tree.length + ? controller.foundMessage + ": " + messageLength : "") + "</div>" ); - } - // Normal group - else { + } else { + // Normal group. $group.addClass("tree-group").hide(); } From bde52df2e846afd59e8d3a475a9ba03545295d7f Mon Sep 17 00:00:00 2001 From: Daniel Maya <daniel.maya@artica.es> Date: Fri, 30 Oct 2020 13:25:33 +0100 Subject: [PATCH 063/104] Added datalist for target ip --- .../include/class/AgentWizard.class.php | 36 ++++++++++++++ pandora_console/include/class/HTML.class.php | 1 + pandora_console/include/functions_html.php | 49 ++++++++++++++++++- 3 files changed, 84 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/class/AgentWizard.class.php b/pandora_console/include/class/AgentWizard.class.php index 7f23e84894..09bf8168d4 100644 --- a/pandora_console/include/class/AgentWizard.class.php +++ b/pandora_console/include/class/AgentWizard.class.php @@ -293,6 +293,29 @@ class AgentWizard extends HTML $this->idAgent = get_parameter('id_agente', ''); $this->idPolicy = get_parameter('id', ''); $this->targetIp = get_parameter('targetIp', ''); + + if (!empty($this->idAgent)) { + $array_aux = db_get_all_rows_sql( + sprintf( + 'SELECT ip FROM taddress ta + INNER JOIN taddress_agent taa ON taa.id_a = ta.id_a + WHERE taa.id_agent = %d', + $this->idAgent + ) + ); + + if (!empty($array_aux)) { + $this->datalist = []; + foreach ($array_aux as $key => $value) { + $this->datalist[] = $value['ip']; + } + } + + if (count($this->datalist) === 1 && $this->targetIp === '') { + $this->targetIp = $this->datalist[0]; + } + } + $this->server = (int) get_parameter('server', '1'); if ($this->server !== 0) { $this->serverType = (int) db_get_value( @@ -563,6 +586,18 @@ class AgentWizard extends HTML ], ]; + if (!empty($this->datalist)) { + $inputs[] = [ + 'id' => 'li_address_list', + 'arguments' => [ + 'name' => 'address_list', + 'type' => 'datalist', + 'value' => $this->datalist, + 'return' => true, + ], + ]; + } + $inputs[] = [ 'label' => __('Target IP'), 'id' => 'txt-targetIp', @@ -573,6 +608,7 @@ class AgentWizard extends HTML 'class' => '', 'value' => $this->targetIp, 'return' => true, + 'list' => 'address_list', ], ]; diff --git a/pandora_console/include/class/HTML.class.php b/pandora_console/include/class/HTML.class.php index 376afc4bfd..41ceabf5ab 100644 --- a/pandora_console/include/class/HTML.class.php +++ b/pandora_console/include/class/HTML.class.php @@ -547,6 +547,7 @@ class HTML } else { if ($input['arguments']['type'] != 'hidden' && $input['arguments']['type'] != 'hidden_extended' + && $input['arguments']['type'] != 'datalist' ) { if (!$direct) { $output .= '<li id="'.$input['id'].'" class="'.$class.'">'; diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index c61d62d686..2c71835165 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -2032,6 +2032,7 @@ function html_print_input_text_extended( 'required', 'autocomplete', 'form', + 'list', ]; $output = '<input '.($password ? 'type="password" autocomplete="'.$autocomplete.'" ' : 'type="text" '); @@ -2257,7 +2258,8 @@ function html_print_input_text( $onKeyDown='', $formTo='', $onKeyUp='', - $disabled=false + $disabled=false, + $list='' ) { if ($maxlength == 0) { $maxlength = 255; @@ -2302,6 +2304,10 @@ function html_print_input_text( $attr['form'] = $formTo; } + if ($list != '') { + $attr['list'] = $list; + } + return html_print_input_text_extended( $name, $value, @@ -4234,7 +4240,9 @@ function html_print_input($data, $wrapper='div', $input_only=false) ((isset($data['autofocus']) === true) ? $data['autofocus'] : false), ((isset($data['onKeyDown']) === true) ? $data['onKeyDown'] : ''), ((isset($data['form']) === true) ? $data['form'] : ''), - ((isset($data['onKeyUp']) === true) ? $data['onKeyUp'] : '') + ((isset($data['onKeyUp']) === true) ? $data['onKeyUp'] : ''), + ((isset($data['disabled']) === true) ? $data['disabled'] : false), + ((isset($data['list']) === true) ? $data['list'] : '') ); break; @@ -4731,6 +4739,14 @@ function html_print_input($data, $wrapper='div', $input_only=false) $output .= html_print_select_multiple_modules_filtered($data); break; + case 'datalist': + $output .= html_print_datalist( + $data['name'], + $data['value'], + ((isset($data['return']) === true) ? $data['return'] : true) + ); + break; + default: // Ignore. break; @@ -4911,3 +4927,32 @@ function html_print_tabs(array $tabs) return $result; } + + +/** + * Create a datalist. + * + * @param string $id Use custom id. + * @param string $values Input values. + * @param string $returnparam Whether to return an output string or echo now (optional, echo by default). + * + * @return string HTML code if return parameter is true. + */ +function html_print_datalist( + $id, + $values, + $return=false +) { + $result = '<datalist id="'.$id.'">'; + foreach ($values as $key => $value) { + $result .= '<option value="'.$value.'">'; + } + + $result .= '</datalist>'; + + if ($return) { + return $result; + } else { + echo $result; + } +} From b3043c2e0181915d88e2fa9e26116d760f7b56a2 Mon Sep 17 00:00:00 2001 From: daniel <daniel.barbero@artica.es> Date: Fri, 30 Oct 2020 13:29:50 +0100 Subject: [PATCH 064/104] Fixed template events --- pandora_console/include/functions_events.php | 140 +++++++++++------- .../include/functions_reporting.php | 2 +- pandora_console/mobile/operation/events.php | 2 +- .../operation/events/events_list.php | 4 +- 4 files changed, 88 insertions(+), 60 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 53fb89e6b7..56df5325cd 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1552,26 +1552,18 @@ function events_get_event($id, $fields=false, $meta=false, $history=false) /** * Retrieve all events ungrouped. * - * @param string $sql_post Sql_post. - * @param integer $offset Offset. - * @param integer $pagination Pagination. - * @param boolean $meta Meta. - * @param boolean $history History. - * @param boolean $total Total. - * @param boolean $history_db History_db. - * @param string $order Order. + * @param string $sql_post Sql_post. + * @param boolean $meta Meta. + * @param boolean $history History. + * @param boolean $returnSql Only Query. * * @return mixed Array of events or false. */ function events_get_events_no_grouped( $sql_post, - $offset=0, - $pagination=1, $meta=false, $history=false, - $total=false, - $history_db=false, - $order='ASC' + $returnSql=false ) { global $config; @@ -1581,7 +1573,11 @@ function events_get_events_no_grouped( $sql .= events_get_secondary_groups_left_join($table); $sql .= $sql_post; - $events = db_get_all_rows_sql($sql, $history_db); + if ($returnSql === true) { + return $sql; + } + + $events = db_get_all_rows_sql($sql, $history); return $events; } @@ -1634,29 +1630,59 @@ function events_get_events_grouped( $event_lj = events_get_secondary_groups_left_join($table); if ($total) { $sql = "SELECT COUNT(*) FROM (SELECT id_evento - FROM $table te $event_lj - WHERE 1=1 ".$sql_post.' + FROM $table te $event_lj ".$sql_post.' GROUP BY estado, evento, id_agente, id_agentmodule'.$groupby_extra.') AS t'; } else { - $sql = "SELECT *, MAX(id_evento) AS id_evento, - GROUP_CONCAT(DISTINCT user_comment SEPARATOR '<br>') AS user_comment, - GROUP_CONCAT(DISTINCT id_evento SEPARATOR ',') AS similar_ids, - COUNT(id_evento) AS event_rep, MAX(utimestamp) AS timestamp_rep, - MIN(utimestamp) AS timestamp_rep_min, - (SELECT owner_user FROM $table WHERE id_evento = MAX(te.id_evento)) owner_user, - (SELECT id_usuario FROM $table WHERE id_evento = MAX(te.id_evento)) id_usuario, - (SELECT id_agente FROM $table WHERE id_evento = MAX(te.id_evento)) id_agente, - (SELECT criticity FROM $table WHERE id_evento = MAX(te.id_evento)) AS criticity, - (SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp, - (SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = te.id_agentmodule) AS module_name - FROM $table te $event_lj - WHERE 1=1 ".$sql_post.' - GROUP BY estado, evento, id_agente, id_agentmodule'.$groupby_extra; - $sql .= ' '.events_get_sql_order($sort_field, $order, 2); - $sql .= ' LIMIT '.$offset.','.$pagination; + $sql = sprintf( + 'SELECT *, + MAX(id_evento) AS id_evento, + GROUP_CONCAT( + DISTINCT user_comment SEPARATOR "<br>" + ) AS user_comment, + GROUP_CONCAT( + DISTINCT id_evento SEPARATOR "," + ) AS similar_ids, + COUNT(id_evento) AS event_rep, MAX(utimestamp) AS timestamp_rep, + MIN(utimestamp) AS timestamp_rep_min, + (SELECT owner_user + FROM %s + WHERE id_evento = MAX(te.id_evento)) AS owner_user, + (SELECT id_usuario + FROM %s + WHERE id_evento = MAX(te.id_evento)) AS id_usuario, + (SELECT id_agente + FROM %s + WHERE id_evento = MAX(te.id_evento)) AS id_agente, + (SELECT criticity + FROM %s + WHERE id_evento = MAX(te.id_evento)) AS criticity, + (SELECT ack_utimestamp + FROM %s + WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp, + (SELECT nombre + FROM tagente_modulo + WHERE id_agente_modulo = te.id_agentmodule) AS module_name + FROM %s te %s + %s + GROUP BY estado, evento, id_agente, id_agentmodule %s + %s + LIMIT %d, %d', + $table, + $table, + $table, + $table, + $table, + $table, + $event_lj, + $sql_post, + $groupby_extra, + events_get_sql_order($sort_field, $order, 2), + $offset, + $pagination + ); } - // Extract the events by filter (or not) from db + // Extract the events by filter (or not) from db. $events = db_get_all_rows_sql($sql, $history_db); if ($total) { @@ -2971,7 +2997,8 @@ function events_get_agent( $type = []; foreach ($filter_event_type as $event_type) { if ($event_type != '') { - // If normal, warning, could be several (going_up_warning, going_down_warning... too complex. + // If normal, warning, could be several + // (going_up_warning, going_down_warning... too complex. // Shown to user only "warning, critical and normal". if ($event_type == 'warning' || $event_type == 'critical' || $event_type == 'normal') { $type[] = " event_type LIKE '%".$event_type."%' "; @@ -2991,10 +3018,10 @@ function events_get_agent( } if ($events_group) { - $sql_where .= sprintf( + $secondary_groups = sprintf( ' INNER JOIN tgrupo tg - ON (te.id_grupo = tg.id_grupo AND tg.id_grupo = %s) - OR (tg.id_grupo = tasg.id_group AND tasg.id_group = %s) + ON (te.id_grupo = tg.id_grupo AND tg.id_grupo IN (%s)) + OR (tg.id_grupo = tasg.id_group AND tasg.id_group IN (%s)) WHERE utimestamp > %d AND utimestamp <= %d ', join(',', $id_group), @@ -3002,22 +3029,27 @@ function events_get_agent( $datelimit, $date ); - } else if ($events_module) { - $sql_where .= sprintf( - ' AND id_agentmodule = %d AND utimestamp > %d - AND utimestamp <= %d ', - $id_agent_module, - $datelimit, - $date - ); + $sql_where = $secondary_groups.' '.$sql_where; } else { - $sql_where .= sprintf( - ' AND id_agente = %d AND utimestamp > %d - AND utimestamp <= %d ', - $id_agent, - $datelimit, - $date - ); + $sql_where = ' WHERE 1=1 '.$sql_where; + + if ($events_module) { + $sql_where .= sprintf( + ' AND id_agentmodule = %d AND utimestamp > %d + AND utimestamp <= %d ', + $id_agent_module, + $datelimit, + $date + ); + } else { + $sql_where .= sprintf( + ' AND id_agente = %d AND utimestamp > %d + AND utimestamp <= %d ', + $id_agent, + $datelimit, + $date + ); + } } if (is_metaconsole() && $id_server) { @@ -3037,11 +3069,7 @@ function events_get_agent( } else { return events_get_events_no_grouped( $sql_where, - 0, - 1000, (is_metaconsole() && $id_server) ? true : false, - false, - false, $history ); } diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 539bc46dc6..479adc67c8 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -2957,7 +2957,7 @@ function reporting_group_report($report, $content) if (empty($id_group)) { $events = []; } else { - $sql_where = sprintf(' AND id_grupo IN (%s) AND estado<>1 ', implode(',', $id_group)); + $sql_where = sprintf(' WHERE id_grupo IN (%s) AND estado<>1 ', implode(',', $id_group)); $events = events_get_events_grouped( $sql_where, 0, diff --git a/pandora_console/mobile/operation/events.php b/pandora_console/mobile/operation/events.php index cca5d7d18e..41d078e1eb 100644 --- a/pandora_console/mobile/operation/events.php +++ b/pandora_console/mobile/operation/events.php @@ -731,7 +731,7 @@ class Events $system = System::getInstance(); // --------------Fill the SQL POST------------------------------- - $sql_post = ''; + $sql_post = ' WHERE 1=1 '; switch ($this->status) { case 0: diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index ae39dabf3b..239a1934e3 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -311,7 +311,7 @@ if ($user_filter != 0 && empty($id_name) && !$update_from_filter_table) { } // Build the condition of the events query. -$sql_post = ''; +$sql_post = ' WHERE 1=1 '; $id_user = $config['id_user']; @@ -1214,7 +1214,7 @@ if ($group_rep == 0) { $sql = 'SELECT COUNT(DISTINCT id_evento) FROM $event_table te $event_lj - WHERE 1=1 $sql_post'; + $sql_post'; $total_events = (int) db_get_sql($sql); } else if ($group_rep == 1) { $total_events = events_get_events_grouped( From f1080757a09fee9d70f9b98da1f145d1e34d1cd2 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin <daniel.barbero@artica.es> Date: Fri, 30 Oct 2020 13:30:59 +0100 Subject: [PATCH 065/104] Fix combo server in reports builder --- .../godmode/reporting/reporting_builder.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 6857a2cd39..a46ee1811e 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -1813,11 +1813,9 @@ switch ($action) { ); $values['id_group'] = get_parameter('combo_group'); - if ($values['server_name'] == '') { - $values['server_name'] = get_parameter( - 'combo_server' - ); - } + $values['server_name'] = get_parameter( + 'combo_server' + ); if ((($values['type'] == 'custom_graph') || ($values['type'] == 'automatic_custom_graph')) @@ -2354,6 +2352,8 @@ switch ($action) { break; } + hd($values['server_name']); + hd(2); if ($values['server_name'] == '') { $values['server_name'] = get_parameter( 'combo_server' From 25de1b686ac3c13bc9d818b90759b6e7561d27f4 Mon Sep 17 00:00:00 2001 From: Luis <luis.calvo@artica.es> Date: Fri, 30 Oct 2020 14:41:33 +0100 Subject: [PATCH 066/104] Fixed oid for getting x64 interfaces module. Fixed visual (module order) bug --- .../include/class/AgentWizard.class.php | 249 +++++++++++------- 1 file changed, 150 insertions(+), 99 deletions(-) diff --git a/pandora_console/include/class/AgentWizard.class.php b/pandora_console/include/class/AgentWizard.class.php index 7f23e84894..e4eb109a57 100644 --- a/pandora_console/include/class/AgentWizard.class.php +++ b/pandora_console/include/class/AgentWizard.class.php @@ -1,4 +1,5 @@ <?php + /** * Agent Wizard for SNMP and WMI * @@ -273,7 +274,7 @@ class AgentWizard extends HTML // Check access. check_login(); - if (! check_acl($config['id_user'], 0, 'AR')) { + if (!check_acl($config['id_user'], 0, 'AR')) { db_pandora_audit( 'ACL Violation', 'Trying to access event viewer' @@ -865,7 +866,6 @@ class AgentWizard extends HTML ], true ); - } @@ -992,10 +992,51 @@ class AgentWizard extends HTML } if ($this->wizardSection === 'snmp_interfaces_explorer') { - // First, try x64 interfaces. - $this->interfacesx64 = true; + // Check if thereis x64 counters. + $snmp_tmp = '.1.3.6.1.2.1.31.1.1.1.6'; + $check_x64 = get_snmpwalk( + $this->targetIp, + $this->version, + $this->community, + $this->authUserV3, + $this->securityLevelV3, + $this->authMethodV3, + $this->authPassV3, + $this->privacyMethodV3, + $this->privacyPassV3, + 0, + $snmp_tmp, + $this->targetPort, + $this->server, + $this->extraArguments + ); + + if ($check_x64) { + $this->interfacesx64 = true; + $oidExplore = '.1.3.6.1.2.1.31.1.1.1.1'; + } else { + $this->interfacesx64 = false; + $oidExplore = '1.3.6.1.2.1.2.2.1.2'; + } + // Explore interface names. $oidExplore = '.1.3.6.1.2.1.31.1.1.1.1'; + $receivedOid = get_snmpwalk( + $this->targetIp, + $this->version, + $this->community, + $this->authUserV3, + $this->securityLevelV3, + $this->authMethodV3, + $this->authPassV3, + $this->privacyMethodV3, + $this->privacyPassV3, + 0, + $oidExplore, + $this->targetPort, + $this->server, + $this->extraArguments + ); } else { // Get the device PEN. $oidExplore = '.1.3.6.1.2.1.1.2.0'; @@ -1310,7 +1351,7 @@ class AgentWizard extends HTML * * @return array */ - public function candidateModuleToCreate(array $data):array + public function candidateModuleToCreate(array $data): array { $modulesActivated = []; $generalInterface = false; @@ -1560,8 +1601,8 @@ class AgentWizard extends HTML if ($this->securityLevelV3 === 'authNoPriv' || $this->securityLevelV3 === 'authPriv' ) { - $values['plugin_parameter'] = $this->authMethodV3; - $values['plugin_pass'] = $this->authPassV3; + $values['plugin_parameter'] = $this->authMethodV3; + $values['plugin_pass'] = $this->authPassV3; if ($this->securityLevelV3 === 'authPriv') { $values['custom_string_1'] = $this->privacyMethodV3; $values['custom_string_2'] = $this->privacyPassV3; @@ -2261,7 +2302,7 @@ class AgentWizard extends HTML private function replacementMacrosPlugin( string $text, array $macros - ):string { + ): string { // Only agents. if (empty($this->idPolicy) === true) { // Common. @@ -2308,7 +2349,7 @@ class AgentWizard extends HTML ?string $value, ?string $unit='', ?int $moduleType=0 - ):string { + ): string { if ($moduleType !== MODULE_TYPE_REMOTE_SNMP_INC && $moduleType !== MODULE_TYPE_GENERIC_DATA_INC && $moduleType !== MODULE_TYPE_REMOTE_TCP_INC @@ -2562,7 +2603,7 @@ class AgentWizard extends HTML // Unpack the extra fields // and include with key field in a field set. $macros = json_decode($module['macros'], true); - $fieldSet = [ '0' => $module['query_key_field'] ]; + $fieldSet = ['0' => $module['query_key_field']]; foreach ($macros as $fieldKey => $fieldMacro) { if (preg_match('/extra_field_/', $fieldKey) !== 0) { $tmpKey = explode('_', $fieldKey); @@ -3100,7 +3141,6 @@ class AgentWizard extends HTML // Add Create Modules form. $this->createModulesForm(); } - } @@ -3209,7 +3249,6 @@ class AgentWizard extends HTML } return false; - } @@ -3306,7 +3345,7 @@ class AgentWizard extends HTML * * @return array Inputs for common data. */ - private function getCommonDataInputs():array + private function getCommonDataInputs(): array { $inputs[] = [ 'id' => 'create-modules-action', @@ -4116,13 +4155,13 @@ class AgentWizard extends HTML } - /** - * This function return the definition of modules for SNMP Interfaces - * - * @param array $data Data. - * - * @return array Return modules for defect. - */ + /** + * This function return the definition of modules for SNMP Interfaces + * + * @param array $data Data. + * + * @return array Return modules for defect. + */ private function getInterfacesModules(array $data=[]) { $moduleDescription = ''; @@ -4207,6 +4246,34 @@ class AgentWizard extends HTML ], ]; + // Get x86 or x64 modules. + if ($this->interfacesx64 === true) { + $definition_temp = $this->getInterfacesModulesx64($data); + } else { + $definition_temp = $this->getInterfacesModulesx86($data); + } + + // General monitoring names. + $general_module_names = [ + 'ifInOctets / ifHCInOctets', + 'ifOutOctets / ifHCOutOctets', + 'ifInUcastPkts / ifHCInUcastPkts', + 'ifOutUcastPkts / ifHCOutUcastPkts', + 'ifInNUcastPkts / ifHCInNUcastPkts', + 'ifOutNUcastPkts / ifHCOutNUcastPkts', + ]; + + if ($name == '') { + foreach ($definition_temp as $module => $module_def) { + $definition_temp[$module]['module_name'] = array_shift($general_module_names); + } + } + + if (empty($definition_temp) === false) { + $definition = array_merge($definition, $definition_temp); + } + + // Continue with common x86 and x84 modules. // IfAdminStatus. $moduleName = $name.'ifAdminStatus'; $definition['ifAdminStatus'] = [ @@ -4333,19 +4400,6 @@ class AgentWizard extends HTML ], ]; - // Get x86 or x64 modules. - if ($this->interfacesx64 === true) { - $definitionx64 = $this->getInterfacesModulesx64($data); - if (empty($definitionx64) === false) { - $definition = array_merge($definition, $definitionx64); - } - } else { - $definitionx86 = $this->getInterfacesModulesx86($data); - if (empty($definitionx86) === false) { - $definition = array_merge($definition, $definitionx86); - } - } - return $definition; } @@ -4815,7 +4869,7 @@ class AgentWizard extends HTML try { exec($execution, $output); } catch (Exception $ex) { - $output = [ '0' => 'ERROR: Failed execution: '.(string) $ex]; + $output = ['0' => 'ERROR: Failed execution: '.(string) $ex]; } return $output; @@ -4913,7 +4967,7 @@ class AgentWizard extends HTML // Meta. var meta = "<?php echo is_metaconsole(); ?>"; var hack_meta = ''; - if(meta){ + if (meta) { hack_meta = '../../'; } @@ -4921,15 +4975,15 @@ class AgentWizard extends HTML showV3Form(); // Filter search interfaces snmp. - $('#text-filter-search').keyup(function () { + $('#text-filter-search').keyup(function() { var string = $('#text-filter-search').val(); var regex = new RegExp(string); var interfaces = $('.interfaces_search'); - interfaces.each(function(){ - if(string == ''){ + interfaces.each(function() { + if (string == '') { $(this).removeClass('hidden'); } else { - if(this.id.match(regex)) { + if (this.id.match(regex)) { $(this).removeClass('hidden'); } else { $(this).addClass('hidden'); @@ -4939,12 +4993,12 @@ class AgentWizard extends HTML }); // Loading. - $('#submit-sub-protocol').click(function () { + $('#submit-sub-protocol').click(function() { $('.wizard-result').remove(); $('#form-create-modules').remove(); $('.textodialogo').remove(); $('.loading-wizard') - .html('<center><span style="font-size:25px;">Loading...</span><img style="width:25px;heigth:25px;" src="'+hack_meta+'images/spinner.gif"></center>'); + .html('<center><span style="font-size:25px;">Loading...</span><img style="width:25px;heigth:25px;" src="' + hack_meta + 'images/spinner.gif"></center>'); }); }); @@ -4962,17 +5016,17 @@ class AgentWizard extends HTML function showSecurityLevelForm() { var selector = $('#securityLevelV3').val(); - if(selector === 'authNoPriv' || selector === 'authPriv'){ + if (selector === 'authNoPriv' || selector === 'authPriv') { $('#txt-authMethodV3').removeClass('invisible'); $('#txt-authPassV3').removeClass('invisible'); - if(selector === 'authPriv'){ + if (selector === 'authPriv') { $('#txt-privacyMethodV3').removeClass('invisible'); $('#txt-privacyPassV3').removeClass('invisible'); } else { $('#txt-privacyMethodV3').addClass('invisible'); $('#txt-privacyPassV3').addClass('invisible'); } - } else { + } else { $('#txt-authMethodV3').addClass('invisible'); $('#txt-authPassV3').addClass('invisible'); $('#txt-privacyMethodV3').addClass('invisible'); @@ -4986,45 +5040,42 @@ class AgentWizard extends HTML var text = ""; var failed = 0; try { - data = JSON.parse(data); - text = data["result"]; + data = JSON.parse(data); + text = data["result"]; } catch (err) { - title = "<?php echo __('Failed'); ?>"; - text = err.message; - failed = 1; + title = "<?php echo __('Failed'); ?>"; + text = err.message; + failed = 1; } if (!failed && data["error"] != undefined) { - title = "<?php echo __('Failed'); ?>"; - text = data["error"]; - failed = 1; + title = "<?php echo __('Failed'); ?>"; + text = data["error"]; + failed = 1; } if (data["report"] != undefined) { - data["report"].forEach(function(item) { - text += "<br>" + item; - }); + data["report"].forEach(function(item) { + text += "<br>" + item; + }); } $("#msg").empty(); $("#msg").html(text); $("#msg").dialog({ - width: 450, - position: { - my: "center", - at: "center", - of: window, - collision: "fit" - }, - title: title, - buttons: [ - { - class: - "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next", + width: 450, + position: { + my: "center", + at: "center", + of: window, + collision: "fit" + }, + title: title, + buttons: [{ + class: "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next", text: "OK", click: function(e) { $("#msg").close(); } - } - ] + }] }); } @@ -5044,8 +5095,8 @@ class AgentWizard extends HTML var markedCount = 0; if (type == 'block') { selectedBlock - .parent() - .removeClass("alpha50"); + .parent() + .removeClass("alpha50"); if (selectedBlock.prop("checked")) { // Set to active the values of fields. $("[id*=hidden-module-active-"+blockNumber+"]") @@ -5054,9 +5105,9 @@ class AgentWizard extends HTML }); // Set checked. $("[id*=checkbox-sel_module_" + blockNumber + "]") - .each(function(){ - $(this).prop("checked", true); - }); + .each(function() { + $(this).prop("checked", true); + }); imageInfoModules.removeClass('hidden'); } else { // Set to inactive the values of fields. @@ -5066,15 +5117,15 @@ class AgentWizard extends HTML }); // Set unchecked. $("[id*=checkbox-sel_module_" + blockNumber + "]") - .each(function(){ - $(this).prop("checked", false); - }); + .each(function() { + $(this).prop("checked", false); + }); imageInfoModules.addClass('hidden'); } } else if (type == 'module') { // Getting the element. - var thisModuleHidden = document.getElementById("hidden-module-active-"+switchName[2]+"_"+moduleNumber); - var thisModule = $("#checkbox-sel_module_"+blockNumber+"_"+moduleNumber); + var thisModuleHidden = document.getElementById("hidden-module-active-" + switchName[2] + "_" + moduleNumber); + var thisModule = $("#checkbox-sel_module_" + blockNumber + "_" + moduleNumber); // Setting the individual field if (thisModule.prop('checked')) { thisModuleHidden.value = '1'; @@ -5084,12 +5135,12 @@ class AgentWizard extends HTML // Get the list of selected modules. $("[id*=checkbox-sel_module_" + blockNumber + "]") - .each(function() { - if ($(this).prop("checked")) { - markedCount++; - } - totalCount++; - }); + .each(function() { + if ($(this).prop("checked")) { + markedCount++; + } + totalCount++; + }); if (totalCount == markedCount) { selectedBlock.prop("checked", true); @@ -5118,7 +5169,7 @@ class AgentWizard extends HTML */ function switchBlockControlInterfaces(e) { var string = $('#text-filter-search').val(); - if(string == ''){ + if (string == '') { if (e.checked) { $(".interfaz_select").prop("checked", true); } else { @@ -5127,15 +5178,15 @@ class AgentWizard extends HTML } else { var regex = new RegExp(string); var interfaces = $('.interfaces_search'); - interfaces.each(function(){ - if(this.id.match(regex)) { + interfaces.each(function() { + if (this.id.match(regex)) { $(this).removeClass('hidden'); if (e.checked) { - $("input[name='interfaz_select_"+this.id+"']") + $("input[name='interfaz_select_" + this.id + "']") .prop("checked", true); } else { - $("input[name='interfaz_select_"+this.id+"']") - .prop("checked", false); + $("input[name='interfaz_select_" + this.id + "']") + .prop("checked", false); } } }); @@ -5143,13 +5194,13 @@ class AgentWizard extends HTML } /** - * Show the modal with modules for create. - */ + * Show the modal with modules for create. + */ function processListModules() { confirmDialog({ title: "<?php echo __('Modules about to be created'); ?>", message: function() { - var id = "div-"+uniqId(); + var id = "div-" + uniqId(); var loading = "<?php echo __('Loading'); ?>" + "..."; $.ajax({ method: "post", @@ -5165,22 +5216,22 @@ class AgentWizard extends HTML }, datatype: "html", success: function(data) { - $('#'+id).empty().append(data); + $('#' + id).empty().append(data); }, error: function(e) { showMsg(e); } }); - return "<div id ='"+id+"'>"+loading+"</div>"; + return "<div id ='" + id + "'>" + loading + "</div>"; }, ok: "<?php echo __('OK'); ?>", cancel: "<?php echo __('Cancel'); ?>", onAccept: function() { - $('#reviewed-modules').submit(); + $('#reviewed-modules').submit(); }, - size:750, - maxHeight:500 + size: 750, + maxHeight: 500 }); } From c4e7c6b5f15162add6b00432d0a5d73e8ac810c6 Mon Sep 17 00:00:00 2001 From: daniel <daniel.barbero@artica.es> Date: Fri, 30 Oct 2020 14:42:10 +0100 Subject: [PATCH 067/104] fix events acknowledge-by --- pandora_console/include/ajax/events.php | 33 ++++++++++++++++--- pandora_console/include/functions_events.php | 14 ++++++-- .../include/javascript/pandora_events.js | 15 ++++++--- 3 files changed, 51 insertions(+), 11 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index d6a760413b..c320f2b5d7 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -1147,12 +1147,37 @@ if ($change_status) { $event_ids = get_parameter('event_ids'); $new_status = get_parameter('new_status'); - $return = events_change_status(explode(',', $event_ids), $new_status, $meta, $history); + $return = events_change_status( + explode(',', $event_ids), + $new_status, + $meta, + $history + ); - if ($return) { - echo 'status_ok'; + if ($return !== false) { + echo json_encode( + [ + 'status' => 'status_ok', + 'user' => db_get_value( + 'fullname', + 'tusuario', + 'id_user', + $config['id_user'] + ), + ] + ); } else { - echo 'status_error'; + echo json_encode( + [ + 'status' => 'status_error', + 'user' => db_get_value( + 'fullname', + 'tusuario', + 'id_user', + $config['id_user'] + ), + ] + ); } return; diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 56df5325cd..33c2309e30 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -4701,16 +4701,24 @@ function events_page_general($event) $table_general->data[] = $data; // If event is validated, show who and when acknowleded it. + $table_general->cellclass[8][1] = 'general_acknowleded'; + $data = []; $data[0] = __('Acknowledged by'); if ($event['estado'] == 1) { - $user_ack = db_get_value('fullname', 'tusuario', 'id_user', $event['id_usuario']); - if (empty($user_ack)) { + $user_ack = db_get_value( + 'fullname', + 'tusuario', + 'id_user', + $event['id_usuario'] + ); + + if (empty($user_ack) === true) { $user_ack = $event['id_usuario']; } - $date_ack = date($config['date_format'], $event['ack_utimestamp']); + $date_ack = io_safe_output($event['ack_utimestamp']); $data[1] = $user_ack.' ('.$date_ack.')'; } else { $data[1] = '<i>'.__('N/A').'</i>'; diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index 55c8ecb74a..c1b604b4e2 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -453,7 +453,6 @@ function perform_response_massive(response, response_id, out_iterator) { // Change the status of an event to new, in process or validated. function event_change_status(event_ids) { var new_status = $("#estado").val(); - var event_id = $("#hidden-id_event").val(); var meta = $("#hidden-meta").val(); var history = $("#hidden-history").val(); @@ -472,7 +471,7 @@ function event_change_status(event_ids) { type: "POST", url: $("#hidden-ajax_file").val(), async: true, - dataType: "html", + dataType: "json", success: function(data) { $("#button-status_button").removeAttr("disabled"); $("#response_loading").hide(); @@ -485,11 +484,20 @@ function event_change_status(event_ids) { $("#notification_status_error").hide(); } - if (data == "status_ok") { + if (data.status == "status_ok") { if (typeof dt_events !== "undefined") { dt_events.draw(false); } $("#notification_status_success").show(); + if (new_status == 1) { + $("#extended_event_general_page table td.general_acknowleded").text( + data.user + ); + } else { + $("#extended_event_general_page table td.general_acknowleded").text( + "N/A" + ); + } } else { $("#notification_status_error").show(); } @@ -942,7 +950,6 @@ function execute_event_response(event_list_btn) { }); break; case "delete_selected": - console.log($(this)); $(".chk_val:checked").each(function() { execute_delete_event_reponse( dt_events, From 3e181c4b01d385d7058d7da413756f8519ec92cc Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Sat, 31 Oct 2020 01:00:26 +0100 Subject: [PATCH 068/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index aee5645947..8525e38417 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201030 +Version: 7.0NG.750-201031 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index ebd275a094..1365ebdd4a 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201030" +pandora_version="7.0NG.750-201031" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 3205d7b83a..3a3fb1eb0a 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201030'; +use constant AGENT_BUILD => '201031'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index e4dd2984b0..6b86960e1e 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201030 +%define release 201031 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index c25a116188..ea6e171592 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201030 +%define release 201031 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 90857b204a..8e8eadc220 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201030" +PI_BUILD="201031" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 1d96fa16cd..e8e9950c9f 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201030} +{201031} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index c12b388dfe..ba8eca64b6 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201030)") +#define PANDORA_VERSION ("7.0NG.750(Build 201031)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f8c9df8998..0642b6cb14 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201030))" + VALUE "ProductVersion", "(7.0NG.750(Build 201031))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4e046ce5a6..40c87cb395 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201030 +Version: 7.0NG.750-201031 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 1731f3c847..7501263696 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201030" +pandora_version="7.0NG.750-201031" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 7b8578f503..8779cb8e62 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201030'; +$build_version = 'PC201031'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 7bf0897508..96a23d5ec5 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201030'; + $build = '201031'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index d6d7f13e72..73fd448c72 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201030 +%define release 201031 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index f03a5e193a..8273f6695b 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201030 +%define release 201031 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 15e0ef43a1..5b9ca914fd 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201030 +%define release 201031 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 010b7b5111..d00cea0cdb 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201030 +Version: 7.0NG.750-201031 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index cf4ae0cca6..094633a5ca 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201030" +pandora_version="7.0NG.750-201031" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index cecadd6c18..a54dbf9d1b 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201030"; +my $pandora_build = "201031"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index f750c10cfc..863a341611 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201030"; +my $pandora_build = "201031"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 95907ab89a..14a818ea02 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201030 +%define release 201031 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 2b9b8df852..c56f10ec54 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201030 +%define release 201031 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 5c3be71b82..e033fd8246 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201030" +PI_BUILD="201031" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index aaa8bece15..7d155fd7a8 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201030"; +my $version = "7.0NG.750 PS201031"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 6757cebf66..fa5e2dfe46 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201030"; +my $version = "7.0NG.750 PS201031"; # save program name for logging my $progname = basename($0); From 4c298531a9b38d2e965181397dfb25efc8cccba3 Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Sun, 1 Nov 2020 01:00:15 +0100 Subject: [PATCH 069/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 8525e38417..eb3b745c83 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201031 +Version: 7.0NG.750-201101 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 1365ebdd4a..84c6ec3a97 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201031" +pandora_version="7.0NG.750-201101" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 3a3fb1eb0a..55f988580e 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201031'; +use constant AGENT_BUILD => '201101'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 6b86960e1e..476a88b1d2 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201031 +%define release 201101 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index ea6e171592..f9676e96c9 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201031 +%define release 201101 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 8e8eadc220..3e6b3171b8 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201031" +PI_BUILD="201101" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index e8e9950c9f..94c0b4c28a 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201031} +{201101} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index ba8eca64b6..97bd7dd526 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201031)") +#define PANDORA_VERSION ("7.0NG.750(Build 201101)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 0642b6cb14..b77be8f2f1 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201031))" + VALUE "ProductVersion", "(7.0NG.750(Build 201101))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 40c87cb395..e8d212836b 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201031 +Version: 7.0NG.750-201101 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 7501263696..fe4a96f9e0 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201031" +pandora_version="7.0NG.750-201101" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 8779cb8e62..af1daf6fc1 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201031'; +$build_version = 'PC201101'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 96a23d5ec5..7232fe2036 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201031'; + $build = '201101'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 73fd448c72..fead5abf63 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201031 +%define release 201101 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 8273f6695b..6624f5b152 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201031 +%define release 201101 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 5b9ca914fd..bb805c3dd7 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201031 +%define release 201101 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index d00cea0cdb..893354573b 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201031 +Version: 7.0NG.750-201101 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 094633a5ca..c559abc4dc 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201031" +pandora_version="7.0NG.750-201101" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index a54dbf9d1b..92d004e74f 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201031"; +my $pandora_build = "201101"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 863a341611..89e4ea91ca 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201031"; +my $pandora_build = "201101"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 14a818ea02..61f38cf4af 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201031 +%define release 201101 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index c56f10ec54..810c7a24d2 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201031 +%define release 201101 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index e033fd8246..82a7ff29f4 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201031" +PI_BUILD="201101" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 7d155fd7a8..93a1501841 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201031"; +my $version = "7.0NG.750 PS201101"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index fa5e2dfe46..7bc48b2d5c 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201031"; +my $version = "7.0NG.750 PS201101"; # save program name for logging my $progname = basename($0); From d8fcfd0da4849ebcc17db631ef5d1ef2774db147 Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Mon, 2 Nov 2020 01:00:16 +0100 Subject: [PATCH 070/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index eb3b745c83..5a1b26b843 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201101 +Version: 7.0NG.750-201102 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 84c6ec3a97..9a5395e388 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201101" +pandora_version="7.0NG.750-201102" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 55f988580e..f13da8b9ea 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201101'; +use constant AGENT_BUILD => '201102'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 476a88b1d2..9965e5a4b6 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201101 +%define release 201102 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index f9676e96c9..b9b6d75aff 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201101 +%define release 201102 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 3e6b3171b8..b935f3daa0 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201101" +PI_BUILD="201102" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 94c0b4c28a..d157ce2a27 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201101} +{201102} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 97bd7dd526..6064d1c339 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201101)") +#define PANDORA_VERSION ("7.0NG.750(Build 201102)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index b77be8f2f1..cd08b9c1ad 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201101))" + VALUE "ProductVersion", "(7.0NG.750(Build 201102))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e8d212836b..053d17803f 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201101 +Version: 7.0NG.750-201102 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index fe4a96f9e0..264e1603f9 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201101" +pandora_version="7.0NG.750-201102" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index af1daf6fc1..621ad277aa 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201101'; +$build_version = 'PC201102'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 7232fe2036..cb09e9baf6 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201101'; + $build = '201102'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index fead5abf63..54904f97b4 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201101 +%define release 201102 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 6624f5b152..80a782a371 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201101 +%define release 201102 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index bb805c3dd7..525924b7c0 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201101 +%define release 201102 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 893354573b..eedfa2b39a 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201101 +Version: 7.0NG.750-201102 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index c559abc4dc..b9355f19ee 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201101" +pandora_version="7.0NG.750-201102" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 92d004e74f..651aa42583 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201101"; +my $pandora_build = "201102"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 89e4ea91ca..c62404346f 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201101"; +my $pandora_build = "201102"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 61f38cf4af..c22d36fed3 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201101 +%define release 201102 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 810c7a24d2..de7c1f1170 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201101 +%define release 201102 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 82a7ff29f4..647a9be4c8 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201101" +PI_BUILD="201102" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 93a1501841..f07b954c88 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201101"; +my $version = "7.0NG.750 PS201102"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 7bc48b2d5c..b5627edf66 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201101"; +my $version = "7.0NG.750 PS201102"; # save program name for logging my $progname = basename($0); From 58aa1d7a0edf80668ae1a641b3791d6eab82032f Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Tue, 3 Nov 2020 01:00:17 +0100 Subject: [PATCH 071/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 5a1b26b843..8c24bcb56a 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201102 +Version: 7.0NG.750-201103 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 9a5395e388..664fc368ed 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201102" +pandora_version="7.0NG.750-201103" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index f13da8b9ea..3d0a47fcda 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201102'; +use constant AGENT_BUILD => '201103'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 9965e5a4b6..1e4ad58036 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201102 +%define release 201103 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index b9b6d75aff..057b26df2a 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201102 +%define release 201103 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index b935f3daa0..e08e30678b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201102" +PI_BUILD="201103" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index d157ce2a27..6228d5b274 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201102} +{201103} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 6064d1c339..d31a184151 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201102)") +#define PANDORA_VERSION ("7.0NG.750(Build 201103)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index cd08b9c1ad..3bdb9fe63b 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201102))" + VALUE "ProductVersion", "(7.0NG.750(Build 201103))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 053d17803f..395cdae6ad 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201102 +Version: 7.0NG.750-201103 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 264e1603f9..b45e60e545 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201102" +pandora_version="7.0NG.750-201103" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 621ad277aa..602e73e968 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201102'; +$build_version = 'PC201103'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index cb09e9baf6..ab1a48c2a2 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201102'; + $build = '201103'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 54904f97b4..91259e1401 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201102 +%define release 201103 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 80a782a371..eb5c08bb57 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201102 +%define release 201103 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 525924b7c0..12875c993f 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201102 +%define release 201103 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index eedfa2b39a..351c9df7da 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201102 +Version: 7.0NG.750-201103 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index b9355f19ee..d6a143ec1b 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201102" +pandora_version="7.0NG.750-201103" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 651aa42583..e424083278 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201102"; +my $pandora_build = "201103"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index c62404346f..08d7a557e1 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201102"; +my $pandora_build = "201103"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index c22d36fed3..aa10565a20 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201102 +%define release 201103 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index de7c1f1170..af6fa905f4 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201102 +%define release 201103 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 647a9be4c8..67b41d9570 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201102" +PI_BUILD="201103" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index f07b954c88..169775b461 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201102"; +my $version = "7.0NG.750 PS201103"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index b5627edf66..f928d268cf 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201102"; +my $version = "7.0NG.750 PS201103"; # save program name for logging my $progname = basename($0); From 8b015659489528346c918ae5efc6a4db4b4b4866 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Tue, 3 Nov 2020 10:08:23 +0100 Subject: [PATCH 072/104] Avoid confirm dialog while profiles are assigned to user --- pandora_console/godmode/users/configure_user.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index e60d591757..0db673acd4 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -1393,12 +1393,16 @@ $(document).ready (function () { // Admin does not require profiles. $('#user_profile_form').submit(); } else { - confirmDialog({ - message: "<?php echo __('User will be created without profiles assigned and won\'t be able to log in, are you sure?'); ?>", - onAccept: function() { - $('#user_profile_form').submit(); - } - }); + if ($('#table_profiles tbody').children().length == 1) { + confirmDialog({ + message: "<?php echo __('User will be created without profiles assigned and won\'t be able to log in, are you sure?'); ?>", + onAccept: function() { + $('#user_profile_form').submit(); + } + }); + } else { + $('#user_profile_form').submit(); + } } }); }); From 5ddb3f4421f0741e4f1cfb62dd12f4b12cc9adf5 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Tue, 3 Nov 2020 10:11:18 +0100 Subject: [PATCH 073/104] title for dialog (user form) --- pandora_console/godmode/users/configure_user.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index 0db673acd4..ec853c599a 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -1395,6 +1395,7 @@ $(document).ready (function () { } else { if ($('#table_profiles tbody').children().length == 1) { confirmDialog({ + title: "<?php echo __('Warning'); ?>", message: "<?php echo __('User will be created without profiles assigned and won\'t be able to log in, are you sure?'); ?>", onAccept: function() { $('#user_profile_form').submit(); From 8202839888cb6ecb4e58fcd60ea19adfee6efbc1 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Tue, 3 Nov 2020 10:14:17 +0100 Subject: [PATCH 074/104] warn while updating user admin > standar --- pandora_console/godmode/users/configure_user.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index ec853c599a..acf412b345 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -1387,7 +1387,7 @@ $(document).ready (function () { }); }); - $('#submit-crtbutton').click(function (e) { + function checkProfiles(e) { e.preventDefault(); if ($('input[name="is_admin"]:checked').val() == 1) { // Admin does not require profiles. @@ -1405,6 +1405,14 @@ $(document).ready (function () { $('#user_profile_form').submit(); } } + } + + $('#submit-crtbutton').click(function (e) { + checkProfiles(e); + }); + + $('#submit-uptbutton').click(function (e) { + checkProfiles(e); }); }); From 081e46c9c2cd141f2a24ec9045eb6de120cebbde Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Wed, 4 Nov 2020 01:00:47 +0100 Subject: [PATCH 075/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 8c24bcb56a..04c7ccfff0 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201103 +Version: 7.0NG.750-201104 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 664fc368ed..8b542cabbc 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201103" +pandora_version="7.0NG.750-201104" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 3d0a47fcda..ecfb28e3a6 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201103'; +use constant AGENT_BUILD => '201104'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 1e4ad58036..3208823d37 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201103 +%define release 201104 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 057b26df2a..4940dea73f 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201103 +%define release 201104 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index e08e30678b..a577aea1e1 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201103" +PI_BUILD="201104" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 6228d5b274..4452eb0cc6 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201103} +{201104} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d31a184151..e64936f6fb 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201103)") +#define PANDORA_VERSION ("7.0NG.750(Build 201104)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 3bdb9fe63b..77211c3d7d 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201103))" + VALUE "ProductVersion", "(7.0NG.750(Build 201104))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 395cdae6ad..a14a6e5917 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201103 +Version: 7.0NG.750-201104 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index b45e60e545..d7baa037d3 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201103" +pandora_version="7.0NG.750-201104" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 602e73e968..09bf2878c3 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201103'; +$build_version = 'PC201104'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index ab1a48c2a2..58c6e85fa0 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201103'; + $build = '201104'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 91259e1401..99ae580add 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201103 +%define release 201104 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index eb5c08bb57..d9383f2d63 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201103 +%define release 201104 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 12875c993f..dc7a4fbe9f 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201103 +%define release 201104 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 351c9df7da..319e5beafa 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201103 +Version: 7.0NG.750-201104 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index d6a143ec1b..c0025b02c6 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201103" +pandora_version="7.0NG.750-201104" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index e424083278..48911166b2 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201103"; +my $pandora_build = "201104"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 08d7a557e1..a30f78dbf3 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201103"; +my $pandora_build = "201104"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index aa10565a20..72cc6de732 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201103 +%define release 201104 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index af6fa905f4..e5eca20c18 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201103 +%define release 201104 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 67b41d9570..e84dc4ff91 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201103" +PI_BUILD="201104" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 169775b461..35c3256ef3 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201103"; +my $version = "7.0NG.750 PS201104"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index f928d268cf..182804e5b7 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201103"; +my $version = "7.0NG.750 PS201104"; # save program name for logging my $progname = basename($0); From 2f2556ef79e3054536a8b6e43327ceaf4708f62d Mon Sep 17 00:00:00 2001 From: Luis <luis.calvo@artica.es> Date: Wed, 4 Nov 2020 16:41:25 +0100 Subject: [PATCH 076/104] Ent 6680 ventana de perdida de conexion incorrecta --- pandora_console/general/login_page.php | 7 + .../include/javascript/connection_check.js | 170 ++++++++++++++++++ pandora_console/include/javascript/pandora.js | 117 ------------ .../include/javascript/pandora_ui.js | 58 ------ pandora_console/index.php | 2 +- .../operation/agentes/stat_win.php | 1 + .../operation/events/sound_events.php | 7 + .../operation/gis_maps/public_console.php | 2 + .../visual_console/legacy_public_view.php | 5 +- .../operation/visual_console/public_view.php | 9 +- 10 files changed, 191 insertions(+), 187 deletions(-) create mode 100644 pandora_console/include/javascript/connection_check.js diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index c4cd8482bc..9f50b10cb5 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -114,6 +114,13 @@ foreach ($custom_fields as $field) { } } +// Connection lost alert. +ui_require_css_file('register', 'include/styles/', true); +ui_require_javascript_file('connection_check'); +$conn_title = __('Connection with server has been lost'); +$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.'); +ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png'); + // Get the custom icons. $docs_logo = ui_get_docs_logo(); $support_logo = ui_get_support_logo(); diff --git a/pandora_console/include/javascript/connection_check.js b/pandora_console/include/javascript/connection_check.js new file mode 100644 index 0000000000..5ea72d2184 --- /dev/null +++ b/pandora_console/include/javascript/connection_check.js @@ -0,0 +1,170 @@ +/** + * ------------------------------------- + * Connection Check + * -------------------------------------- + */ + +checkConnection(1); + +/** + * Performs connection tests every minutes and add connection listeners + * @param {integer} time in minutes + */ + +function checkConnection(minutes) { + var cicle = minutes * 60 * 1000; + var checkConnection = setInterval(handleConnection, cicle); + + // Connection listeters. + window.addEventListener("online", handleConnection); + window.addEventListener("offline", handleConnection); +} + +/** + * Handle connection status test. + * + * Test conectivity with server and shows modal message. + */ +function handleConnection() { + var connected; + var msg = "online"; + + if (navigator.onLine) { + isReachable(getServerUrl()) + .then(function(online) { + if (online) { + // handle online status + connected = true; + showConnectionMessage(connected, msg); + } else { + connected = false; + msg = "No connectivity with server"; + showConnectionMessage(connected, msg); + } + }) + .catch(function(err) { + connected = false; + msg = err; + showConnectionMessage(connected, msg); + }); + } else { + // handle offline status + connected = false; + msg = "Connection offline"; + showConnectionMessage(connected, msg); + } +} + +/** + * Test server reachibilty and get response. + * + * @param {String} url + * + * Return {promise} + */ +function isReachable(url) { + /** + * Note: fetch() still "succeeds" for 404s on subdirectories, + * which is ok when only testing for domain reachability. + * + * Example: + * https://google.com/noexist does not throw + * https://noexist.com/noexist does throw + */ + return fetch(url, { method: "HEAD", mode: "no-cors" }) + .then(function(resp) { + return resp && (resp.ok || resp.type === "opaque"); + }) + .catch(function(error) { + console.warn("[conn test failure]:", error); + }); +} + +/** + * Gets server origin url + */ +function getServerUrl() { + var server_url; + + server_url = window.location.origin; + + return server_url; +} + +/** + * Shows or hide connection infoMessage. + * + * @param {bool} conn + * @param {string} msg + */ +function showConnectionMessage(conn = true, msg = "") { + var data = {}; + if (conn) { + $("div#message_dialog_connection") + .closest(".ui-dialog-content") + .dialog("close"); + } else { + data.title = "Connection with server has been lost"; + data.text = "Connection status: " + msg; + + infoMessage(data, "message_dialog_connection"); + } +} + +function infoMessage(data, idMsg) { + var title = data.title; + var err_messge = data.text; + + if (idMsg == null) { + idMsg = uniqId(); + } + + if ($("#" + idMsg).length === 0) { + $("body").append('<div title="' + title + '" id="' + idMsg + '"></div>'); + $("#" + idMsg).empty(); + } + + $("#err_msg").empty(); + $("#err_msg").html("\n\n" + err_messge); + + $("#" + idMsg) + .dialog({ + height: 250, + width: 528, + opacity: 1, + modal: true, + position: { + my: "center", + at: "center", + of: window, + collision: "fit" + }, + title: data.title, + buttons: [ + { + class: + "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next", + text: "Retry", + click: function(e) { + handleConnection(); + } + }, + { + class: + "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-cancel", + text: "Close", + click: function() { + $(this).dialog("close"); + } + } + ], + + open: function(event, ui) { + $(".ui-widget-overlay").addClass("error-modal-opened"); + }, + close: function(event, ui) { + $(".ui-widget-overlay").removeClass("error-modal-opened"); + } + }) + .show(); +} diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index e7f007a425..04a8f5336e 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -1930,120 +1930,3 @@ function ajaxRequest(id, settings) { } }); } - -/** - * ------------------------------------- - * Connection Check - * -------------------------------------- - */ - -checkConnection(1); - -/** - * Performs connection tests every minutes and add connection listeners - * @param {integer} time in minutes - */ - -function checkConnection(minutes) { - var cicle = minutes * 60 * 1000; - var checkConnection = setInterval(handleConnection, cicle); - - // Connection listeters. - window.addEventListener("online", handleConnection); - window.addEventListener("offline", handleConnection); -} - -/** - * Handle connection status test. - * - * Test conectivity with server and shows modal message. - */ -function handleConnection() { - var connected; - var msg = "online"; - - if (navigator.onLine) { - isReachable(getServerUrl()) - .then(function(online) { - if (online) { - // handle online status - connected = true; - showConnectionMessage(connected, msg); - } else { - connected = false; - msg = "No connectivity with server"; - showConnectionMessage(connected, msg); - } - }) - .catch(function(err) { - connected = false; - msg = err; - showConnectionMessage(connected, msg); - }); - } else { - // handle offline status - connected = false; - msg = "Connection offline"; - showConnectionMessage(connected, msg); - } -} - -/** - * Test server reachibilty and get response. - * - * @param {String} url - * - * Return {promise} - */ -function isReachable(url) { - /** - * Note: fetch() still "succeeds" for 404s on subdirectories, - * which is ok when only testing for domain reachability. - * - * Example: - * https://google.com/noexist does not throw - * https://noexist.com/noexist does throw - */ - return fetch(url, { method: "HEAD", mode: "no-cors" }) - .then(function(resp) { - return resp && (resp.ok || resp.type === "opaque"); - }) - .catch(function(error) { - console.warn("[conn test failure]:", error); - }); -} - -/** - * Gets server origin url - */ -function getServerUrl() { - var server_url; - - try { - server_url = get_php_value("homeurl"); - } catch (SyntaxError) { - console.warn("Pandora homeurl cannot be found."); - server_url = $("#hidden-homeurl").val(); - } - return server_url; -} - -/** - * Shows or hide connection infoMessage. - * - * @param {bool} conn - * @param {string} msg - */ -function showConnectionMessage(conn = true, msg = "") { - var data = {}; - if (conn) { - $("div#message_dialog_connection") - .closest(".ui-dialog-content") - .dialog("close"); - } else { - data.title = "Connection with server has been lost"; - data.text = "Connection status: " + msg; - - infoMessage(data, "message_dialog_connection"); - } -} diff --git a/pandora_console/include/javascript/pandora_ui.js b/pandora_console/include/javascript/pandora_ui.js index 2445473591..15b7f83217 100644 --- a/pandora_console/include/javascript/pandora_ui.js +++ b/pandora_console/include/javascript/pandora_ui.js @@ -494,61 +494,3 @@ function generalShowMsg(data, idMsg) { ] }); } - -function infoMessage(data, idMsg) { - var title = data.title; - var err_messge = data.text; - - if (idMsg == null) { - idMsg = uniqId(); - } - - if ($("#" + idMsg).length === 0) { - $("body").append('<div title="' + title + '" id="' + idMsg + '"></div>'); - $("#" + idMsg).empty(); - } - - $("#err_msg").empty(); - $("#err_msg").html("\n\n" + err_messge); - - $("#" + idMsg) - .dialog({ - height: 250, - width: 528, - opacity: 1, - modal: true, - position: { - my: "center", - at: "center", - of: window, - collision: "fit" - }, - title: data.title, - buttons: [ - { - class: - "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next", - text: "Retry", - click: function(e) { - handleConnection(); - } - }, - { - class: - "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-cancel", - text: "Close", - click: function() { - $(this).dialog("close"); - } - } - ], - - open: function(event, ui) { - $(".ui-widget-overlay").addClass("error-modal-opened"); - }, - close: function(event, ui) { - $(".ui-widget-overlay").removeClass("error-modal-opened"); - } - }) - .show(); -} diff --git a/pandora_console/index.php b/pandora_console/index.php index 599e013c12..f7f3d6b207 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -1255,8 +1255,8 @@ echo '</div>'; echo '<div id="um_msg_receiver">'; echo '</div>'; - // Connection lost alert. +ui_require_javascript_file('connection_check'); $conn_title = __('Connection with server has been lost'); $conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.'); ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png'); diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index d5e22eb06b..a75e30e269 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -86,6 +86,7 @@ ui_require_css_file('register', 'include/styles/', true); // Connection lost alert. $conn_title = __('Connection with server has been lost'); $conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.'); +ui_require_javascript_file('connection_check'); ui_print_message_dialog( $conn_title, $conn_text, diff --git a/pandora_console/operation/events/sound_events.php b/pandora_console/operation/events/sound_events.php index 5037e63b22..7434c18eaf 100644 --- a/pandora_console/operation/events/sound_events.php +++ b/pandora_console/operation/events/sound_events.php @@ -61,6 +61,13 @@ echo '</head>'; echo "<body style='background-color: #494949; max-width: 550px; max-height: 400px; margin-top:40px;'>"; echo "<h1 class='modalheaderh1'>".__('Sound console').'</h1>'; +// Connection lost alert. +ui_require_css_file('register', 'include/styles/', true); +$conn_title = __('Connection with server has been lost'); +$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.'); +ui_require_javascript_file('connection_check'); +ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png'); + $table = new StdClass; $table->width = '100%'; $table->styleTable = 'padding-left:16px; padding-right:16px; padding-top:16px;'; diff --git a/pandora_console/operation/gis_maps/public_console.php b/pandora_console/operation/gis_maps/public_console.php index ba5b99633c..a756d04c0c 100755 --- a/pandora_console/operation/gis_maps/public_console.php +++ b/pandora_console/operation/gis_maps/public_console.php @@ -273,8 +273,10 @@ if ($layers != false) { gis_activate_ajax_refresh($layers, $timestampLastOperation, 1, $idMap); // Connection lost alert. + ui_require_css_file('register', 'include/styles/', true); $conn_title = __('Connection with server has been lost'); $conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.'); + ui_require_javascript_file('connection_check'); ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png'); } diff --git a/pandora_console/operation/visual_console/legacy_public_view.php b/pandora_console/operation/visual_console/legacy_public_view.php index 4df0a6db28..609447800e 100644 --- a/pandora_console/operation/visual_console/legacy_public_view.php +++ b/pandora_console/operation/visual_console/legacy_public_view.php @@ -48,6 +48,7 @@ html_print_input_hidden('homeurl', $config['homeurl']); $url_css_modal = ui_get_full_url('include/styles/register.css', false, false, false); echo '<link rel="stylesheet" href="'.$url_css_modal.'" type="text/css" />'; // Connection lost alert. +ui_require_javascript_file('connection_check', 'include/javascript/', true); $conn_title = __('Connection with server has been lost'); $conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.'); ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png'); @@ -157,10 +158,6 @@ echo '<div style="display: none;" id="qrcode_container" title="'.__('QR code of echo '<div id="qrcode_container_image"></div>'; echo '</div>'; -// Connection lost alert. -$conn_title = __('Connection with server has been lost'); -$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.'); -ui_print_message_alert($conn_title, $conn_text, 'connection', '/images/error_1.png'); ui_require_jquery_file('countdown', 'include/javascript/', true); ui_require_javascript_file('wz_jsgraphics', 'include/javascript/', true); diff --git a/pandora_console/operation/visual_console/public_view.php b/pandora_console/operation/visual_console/public_view.php index 301ec3ca9c..6cc9f817a1 100644 --- a/pandora_console/operation/visual_console/public_view.php +++ b/pandora_console/operation/visual_console/public_view.php @@ -29,11 +29,10 @@ if (file_exists(ENTERPRISE_DIR.'/include/functions_login.php')) { require_once $config['homedir'].'/vendor/autoload.php'; ui_require_css_file('visual_maps'); -ui_require_css_file('register'); - -html_print_input_hidden('homeurl', $config['homeurl']); +ui_require_css_file('register', 'include/styles/', true); // Connection lost alert. +ui_require_javascript_file('connection_check', 'include/javascript/', true); $conn_title = __('Connection with server has been lost'); $conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.'); ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png'); @@ -140,10 +139,6 @@ echo '<div style="display: none;" id="qrcode_container" title="'.__('QR code of echo '<div id="qrcode_container_image"></div>'; echo '</div>'; -// Connection lost alert. -$conn_title = __('Connection with server has been lost'); -$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.'); -ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png'); // Check groups can access user. $aclUserGroups = []; From 6662b4f2862d3d8cef8c0900f06af10e64072a46 Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Thu, 5 Nov 2020 01:00:35 +0100 Subject: [PATCH 077/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 04c7ccfff0..35b6518513 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201104 +Version: 7.0NG.750-201105 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 8b542cabbc..cf2eb1e980 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201104" +pandora_version="7.0NG.750-201105" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index ecfb28e3a6..331f857f57 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201104'; +use constant AGENT_BUILD => '201105'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 3208823d37..002d42b296 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201104 +%define release 201105 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 4940dea73f..7bc7ebbf86 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201104 +%define release 201105 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index a577aea1e1..ecae81300e 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201104" +PI_BUILD="201105" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 4452eb0cc6..6fd065ba3c 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201104} +{201105} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e64936f6fb..f76231aa88 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201104)") +#define PANDORA_VERSION ("7.0NG.750(Build 201105)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 77211c3d7d..d8664851d2 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201104))" + VALUE "ProductVersion", "(7.0NG.750(Build 201105))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a14a6e5917..8812b0febf 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201104 +Version: 7.0NG.750-201105 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index d7baa037d3..b24df3257b 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201104" +pandora_version="7.0NG.750-201105" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 09bf2878c3..1eb5c31d8e 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201104'; +$build_version = 'PC201105'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 58c6e85fa0..a2adc1d133 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201104'; + $build = '201105'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 99ae580add..53e36049cb 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201104 +%define release 201105 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index d9383f2d63..4aaf82e99d 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201104 +%define release 201105 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index dc7a4fbe9f..8217053f12 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201104 +%define release 201105 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 319e5beafa..bfd68738c9 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201104 +Version: 7.0NG.750-201105 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index c0025b02c6..38ec25a5e7 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201104" +pandora_version="7.0NG.750-201105" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 48911166b2..c94687866a 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201104"; +my $pandora_build = "201105"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index a30f78dbf3..839f1d3550 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201104"; +my $pandora_build = "201105"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 72cc6de732..6718c68ed7 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201104 +%define release 201105 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index e5eca20c18..7c589a530c 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201104 +%define release 201105 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index e84dc4ff91..2b7651608a 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201104" +PI_BUILD="201105" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 35c3256ef3..cee09ca550 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201104"; +my $version = "7.0NG.750 PS201105"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 182804e5b7..ba141b545f 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201104"; +my $version = "7.0NG.750 PS201105"; # save program name for logging my $progname = basename($0); From 2cbe4643bc3b6bb21fc6766585ecf51158681197 Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Fri, 6 Nov 2020 01:00:35 +0100 Subject: [PATCH 078/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 35b6518513..e78509f4fb 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201105 +Version: 7.0NG.750-201106 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index cf2eb1e980..34e2c63f75 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201105" +pandora_version="7.0NG.750-201106" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 331f857f57..6653ed87b4 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201105'; +use constant AGENT_BUILD => '201106'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 002d42b296..82989e2377 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201105 +%define release 201106 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 7bc7ebbf86..d8cf7fd85e 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201105 +%define release 201106 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index ecae81300e..9b67b8edd0 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201105" +PI_BUILD="201106" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 6fd065ba3c..2d0eefa0b1 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201105} +{201106} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f76231aa88..77917986e5 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201105)") +#define PANDORA_VERSION ("7.0NG.750(Build 201106)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index d8664851d2..3e50c6637e 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201105))" + VALUE "ProductVersion", "(7.0NG.750(Build 201106))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 8812b0febf..36d6e97af4 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201105 +Version: 7.0NG.750-201106 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index b24df3257b..efe9ce72a1 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201105" +pandora_version="7.0NG.750-201106" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 1eb5c31d8e..0ff041025b 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201105'; +$build_version = 'PC201106'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index a2adc1d133..dbd1515dfc 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201105'; + $build = '201106'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 53e36049cb..e5eb888467 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201105 +%define release 201106 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 4aaf82e99d..f73d8b7b81 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201105 +%define release 201106 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 8217053f12..39a813ae52 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201105 +%define release 201106 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index bfd68738c9..ce14200139 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201105 +Version: 7.0NG.750-201106 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 38ec25a5e7..2a1476e304 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201105" +pandora_version="7.0NG.750-201106" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index c94687866a..8d1970f775 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201105"; +my $pandora_build = "201106"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 839f1d3550..6ccf363909 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201105"; +my $pandora_build = "201106"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 6718c68ed7..2889ee3920 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201105 +%define release 201106 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 7c589a530c..08b2f7f037 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201105 +%define release 201106 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 2b7651608a..e405468b23 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201105" +PI_BUILD="201106" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index cee09ca550..f20e41c9ce 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201105"; +my $version = "7.0NG.750 PS201106"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index ba141b545f..30820b6c7f 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201105"; +my $version = "7.0NG.750 PS201106"; # save program name for logging my $progname = basename($0); From 5010cd7313fac3b9e49ed93cedbf2514c4a44916 Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Sat, 7 Nov 2020 01:00:30 +0100 Subject: [PATCH 079/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index e78509f4fb..74ee86ded9 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201106 +Version: 7.0NG.750-201107 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 34e2c63f75..28520b5681 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201106" +pandora_version="7.0NG.750-201107" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 6653ed87b4..40c2a28dd5 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201106'; +use constant AGENT_BUILD => '201107'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 82989e2377..cddb137231 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201106 +%define release 201107 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index d8cf7fd85e..be2cd6522c 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201106 +%define release 201107 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 9b67b8edd0..f68b66b383 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201106" +PI_BUILD="201107" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 2d0eefa0b1..ad6313780d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201106} +{201107} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 77917986e5..89e7af5f24 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201106)") +#define PANDORA_VERSION ("7.0NG.750(Build 201107)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 3e50c6637e..08714cda4c 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201106))" + VALUE "ProductVersion", "(7.0NG.750(Build 201107))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 36d6e97af4..ac9bdb38ed 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201106 +Version: 7.0NG.750-201107 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index efe9ce72a1..424d2aff98 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201106" +pandora_version="7.0NG.750-201107" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 0ff041025b..245c46add3 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201106'; +$build_version = 'PC201107'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index dbd1515dfc..1fca4c4cb0 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201106'; + $build = '201107'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index e5eb888467..9bef5fcca6 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201106 +%define release 201107 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index f73d8b7b81..8595a6dd86 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201106 +%define release 201107 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 39a813ae52..a89e8a5785 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201106 +%define release 201107 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index ce14200139..e664b79c12 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201106 +Version: 7.0NG.750-201107 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 2a1476e304..92ea1b2647 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201106" +pandora_version="7.0NG.750-201107" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 8d1970f775..8bf6c1ed1a 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201106"; +my $pandora_build = "201107"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 6ccf363909..3300f3189f 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201106"; +my $pandora_build = "201107"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 2889ee3920..0e9f32e2d0 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201106 +%define release 201107 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 08b2f7f037..1605a0c731 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201106 +%define release 201107 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index e405468b23..20473cdf54 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201106" +PI_BUILD="201107" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index f20e41c9ce..c01889ef64 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201106"; +my $version = "7.0NG.750 PS201107"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 30820b6c7f..0ddcf9d733 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201106"; +my $version = "7.0NG.750 PS201107"; # save program name for logging my $progname = basename($0); From 4887dc3e3d79512c8c787d94701f44f058f0ab5e Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Sun, 8 Nov 2020 01:00:36 +0100 Subject: [PATCH 080/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 74ee86ded9..57d156c07b 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201107 +Version: 7.0NG.750-201108 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 28520b5681..a612142fdb 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201107" +pandora_version="7.0NG.750-201108" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 40c2a28dd5..836a639a44 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201107'; +use constant AGENT_BUILD => '201108'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index cddb137231..96233a4f10 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201107 +%define release 201108 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index be2cd6522c..6b4ee2a7f5 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201107 +%define release 201108 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index f68b66b383..dbf516381b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201107" +PI_BUILD="201108" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ad6313780d..b90549756e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201107} +{201108} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 89e7af5f24..7e4195faf6 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201107)") +#define PANDORA_VERSION ("7.0NG.750(Build 201108)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 08714cda4c..a7569d26b5 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201107))" + VALUE "ProductVersion", "(7.0NG.750(Build 201108))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index ac9bdb38ed..3840e65827 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201107 +Version: 7.0NG.750-201108 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 424d2aff98..e92e7e889a 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201107" +pandora_version="7.0NG.750-201108" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 245c46add3..a0824eb6eb 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201107'; +$build_version = 'PC201108'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1fca4c4cb0..f2b4920e5d 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201107'; + $build = '201108'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 9bef5fcca6..20256a00d9 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201107 +%define release 201108 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 8595a6dd86..73be85396d 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201107 +%define release 201108 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index a89e8a5785..c5769f324f 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201107 +%define release 201108 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index e664b79c12..8644f23409 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201107 +Version: 7.0NG.750-201108 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 92ea1b2647..310fb4970d 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201107" +pandora_version="7.0NG.750-201108" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 8bf6c1ed1a..1ae79f7abf 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201107"; +my $pandora_build = "201108"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 3300f3189f..74600faa61 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201107"; +my $pandora_build = "201108"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 0e9f32e2d0..c7a0b6fc76 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201107 +%define release 201108 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 1605a0c731..94bc6b49b4 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201107 +%define release 201108 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 20473cdf54..efdd1400b6 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201107" +PI_BUILD="201108" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index c01889ef64..aa57019e8b 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201107"; +my $version = "7.0NG.750 PS201108"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 0ddcf9d733..befbfff16c 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201107"; +my $version = "7.0NG.750 PS201108"; # save program name for logging my $progname = basename($0); From 767397ceb623d2dbc1a8487e1bfac83be9fded4c Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Mon, 9 Nov 2020 01:00:33 +0100 Subject: [PATCH 081/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 57d156c07b..4b0e762234 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201108 +Version: 7.0NG.750-201109 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index a612142fdb..545395b419 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201108" +pandora_version="7.0NG.750-201109" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 836a639a44..1d9309fc1a 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201108'; +use constant AGENT_BUILD => '201109'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 96233a4f10..5c3e980ed8 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201108 +%define release 201109 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 6b4ee2a7f5..cd5041412d 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201108 +%define release 201109 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index dbf516381b..abf8e47f3f 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201108" +PI_BUILD="201109" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index b90549756e..79382379d7 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201108} +{201109} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 7e4195faf6..ac687ec5e8 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201108)") +#define PANDORA_VERSION ("7.0NG.750(Build 201109)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a7569d26b5..18673def7a 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201108))" + VALUE "ProductVersion", "(7.0NG.750(Build 201109))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 3840e65827..aefba89897 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201108 +Version: 7.0NG.750-201109 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index e92e7e889a..59ed03020b 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201108" +pandora_version="7.0NG.750-201109" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index a0824eb6eb..0d8508e25d 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201108'; +$build_version = 'PC201109'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index f2b4920e5d..b0d30602f4 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201108'; + $build = '201109'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 20256a00d9..9894018bfc 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201108 +%define release 201109 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 73be85396d..7044aa1654 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201108 +%define release 201109 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index c5769f324f..25b5f1aff2 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201108 +%define release 201109 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 8644f23409..b120f7d70a 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201108 +Version: 7.0NG.750-201109 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 310fb4970d..6b72adc223 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201108" +pandora_version="7.0NG.750-201109" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 1ae79f7abf..cbf407df40 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201108"; +my $pandora_build = "201109"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 74600faa61..0939a4661d 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201108"; +my $pandora_build = "201109"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index c7a0b6fc76..471ca2a17a 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201108 +%define release 201109 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 94bc6b49b4..1736d3978a 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201108 +%define release 201109 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index efdd1400b6..c16466dd4b 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201108" +PI_BUILD="201109" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index aa57019e8b..ef378f2619 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201108"; +my $version = "7.0NG.750 PS201109"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index befbfff16c..77c9da45e3 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201108"; +my $version = "7.0NG.750 PS201109"; # save program name for logging my $progname = basename($0); From 2046689b002bdab0b03d7d3ec54362d8d4b6a42a Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Tue, 10 Nov 2020 01:01:19 +0100 Subject: [PATCH 082/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 4b0e762234..9d8383f3cd 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201109 +Version: 7.0NG.750-201110 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 545395b419..895c172aff 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201109" +pandora_version="7.0NG.750-201110" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 1d9309fc1a..248e478e90 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201109'; +use constant AGENT_BUILD => '201110'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 5c3e980ed8..775e0b8d03 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201109 +%define release 201110 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index cd5041412d..f5216f943e 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201109 +%define release 201110 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index abf8e47f3f..2c888df984 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201109" +PI_BUILD="201110" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 79382379d7..73e5275392 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201109} +{201110} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index ac687ec5e8..694a757fa1 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201109)") +#define PANDORA_VERSION ("7.0NG.750(Build 201110)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 18673def7a..dd07c7e05e 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201109))" + VALUE "ProductVersion", "(7.0NG.750(Build 201110))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index aefba89897..cb163f7a71 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201109 +Version: 7.0NG.750-201110 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 59ed03020b..e91af80084 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201109" +pandora_version="7.0NG.750-201110" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 0d8508e25d..8081929e5f 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201109'; +$build_version = 'PC201110'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index b0d30602f4..06268b68a7 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201109'; + $build = '201110'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 9894018bfc..ed517c0500 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201109 +%define release 201110 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 7044aa1654..c784d10b0b 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201109 +%define release 201110 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 25b5f1aff2..77fda01772 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201109 +%define release 201110 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index b120f7d70a..d03a593531 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201109 +Version: 7.0NG.750-201110 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 6b72adc223..a9ffa068ab 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201109" +pandora_version="7.0NG.750-201110" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index cbf407df40..677e8c1149 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201109"; +my $pandora_build = "201110"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 0939a4661d..da308bf854 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201109"; +my $pandora_build = "201110"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 471ca2a17a..a85eb9033a 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201109 +%define release 201110 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 1736d3978a..4256526172 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201109 +%define release 201110 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index c16466dd4b..dbd631dc57 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201109" +PI_BUILD="201110" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index ef378f2619..d0f9298278 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201109"; +my $version = "7.0NG.750 PS201110"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 77c9da45e3..e043a0a4b3 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201109"; +my $version = "7.0NG.750 PS201110"; # save program name for logging my $progname = basename($0); From ea0e2299517345c76db8752e8e342647b7c02710 Mon Sep 17 00:00:00 2001 From: Daniel Maya <daniel.maya@artica.es> Date: Tue, 10 Nov 2020 12:10:25 +0100 Subject: [PATCH 083/104] Fixed license expired and license trial --- pandora_console/general/register.php | 9 ++++--- .../update_manager/update_manager.offline.php | 7 +++++ .../update_manager/update_manager.online.php | 7 +++++ .../include/functions_update_manager.php | 27 ++++++++++++++++++- 4 files changed, 46 insertions(+), 4 deletions(-) diff --git a/pandora_console/general/register.php b/pandora_console/general/register.php index e7097b994e..8c10adc32b 100644 --- a/pandora_console/general/register.php +++ b/pandora_console/general/register.php @@ -148,7 +148,8 @@ if ($initial && users_is_admin()) { config_wiz_modal( false, true, - (($registration === true) ? 'show_registration_wizard()' : null) + (($registration === true) ? 'show_registration_wizard()' : null), + true ); } @@ -159,7 +160,8 @@ if (!$config['disabled_newsletter']) { false, // Launch only if not being launch from 'initial'. !$initial, - (($show_newsletter === true) ? 'force_run_newsletter()' : null) + (($show_newsletter === false) ? 'force_run_newsletter()' : null), + true ); } else { if ($show_newsletter) { @@ -167,7 +169,8 @@ if (!$config['disabled_newsletter']) { newsletter_wiz_modal( false, // Launch only if not being call from 'registration'. - !$registration && !$initial + !$registration && !$initial, + true ); } } diff --git a/pandora_console/godmode/update_manager/update_manager.offline.php b/pandora_console/godmode/update_manager/update_manager.offline.php index 8fb4447772..37e9eed8e8 100644 --- a/pandora_console/godmode/update_manager/update_manager.offline.php +++ b/pandora_console/godmode/update_manager/update_manager.offline.php @@ -44,6 +44,13 @@ if (! check_acl($config['id_user'], 0, 'PM') return; } +if (update_manager_verify_license_expired()) { + ui_print_error_message( + __('The license has expired. Please contact Artica at info@artica.es') + ); + return; +} + $baseurl = ui_get_full_url(false, false, false, false); $current_package = db_get_value( diff --git a/pandora_console/godmode/update_manager/update_manager.online.php b/pandora_console/godmode/update_manager/update_manager.online.php index a1524d5518..6ac5c61f9b 100644 --- a/pandora_console/godmode/update_manager/update_manager.online.php +++ b/pandora_console/godmode/update_manager/update_manager.online.php @@ -94,6 +94,13 @@ if ($upload_max_filesize < $PHPupload_max_filesize_min) { $php_settings_fine++; } +if (update_manager_verify_license_expired()) { + ui_print_error_message( + __('The license has expired. Please contact Artica at info@artica.es') + ); + return; +} + // Verify registry. if (update_manager_verify_registration() === false) { ui_require_css_file('register'); diff --git a/pandora_console/include/functions_update_manager.php b/pandora_console/include/functions_update_manager.php index 2b3dcbc093..6156e5e174 100755 --- a/pandora_console/include/functions_update_manager.php +++ b/pandora_console/include/functions_update_manager.php @@ -73,6 +73,24 @@ function update_manager_verify_trial() } +/** + * Check if the trial license is not expired. + * + * @return boolean true if the trial license is expired, false otherwise. + */ +function update_manager_verify_license_expired() +{ + global $config; + + $current_date = date('Ymd'); + if (isset($config['license_expiry_date']) && $current_date >= $config['license_expiry_date']) { + return true; + } + + return false; +} + + /** * Parses responses from configuration wizard. * @@ -454,13 +472,20 @@ function registration_wiz_process() function registration_wiz_modal( $return=false, $launch=true, - $callback=false + $callback=false, + $return_message=false ) { global $config; $output = ''; // Do not show the wizard for trial licenses. if (update_manager_verify_trial()) { + ui_print_info_message('Your license is trial. Please contact Artica at info@artica.es for a valid license', '', $return_message); + return ''; + } + + if (update_manager_verify_license_expired()) { + ui_print_error_message('The license has expired. Please contact Artica at info@artica.es', '', $return_message); return ''; } From b8fde5e8f5dc6f0117d43c254bcc8b5298e438c9 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Tue, 10 Nov 2020 17:56:56 +0100 Subject: [PATCH 084/104] Tools (trim) added --- pandora_server/lib/PandoraFMS/Tools.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 300e66e5a6..4c9683c888 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -856,6 +856,24 @@ sub clean_blank { return $input; } +################################################################################ +# Erase blank spaces before and after the string +################################################################################ +sub trim { + my $string = shift; + if (is_empty($string)){ + return ""; + } + + $string =~ s/\r//g; + + chomp($string); + $string =~ s/^\s+//g; + $string =~ s/\s+$//g; + + return $string; +} + ################################################################################ # sub sqlWrap(texto) # Elimina comillas y caracteres problematicos y los sustituye por equivalentes From 7ea84a438487e7cbc8f4794c69b48381452b7abd Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Tue, 10 Nov 2020 19:24:08 +0100 Subject: [PATCH 085/104] added tentacle common dir, TODO clean copies, group in CICD tasks --- tentacle/tentacle_client | 1101 ++++++++++++++++++++++ tentacle/tentacle_server | 1884 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 2985 insertions(+) create mode 100755 tentacle/tentacle_client create mode 100755 tentacle/tentacle_server diff --git a/tentacle/tentacle_client b/tentacle/tentacle_client new file mode 100755 index 0000000000..913beda931 --- /dev/null +++ b/tentacle/tentacle_client @@ -0,0 +1,1101 @@ +#!/usr/bin/perl +################################################################################ +# +# Copyright (c) 2007-2008 Ramon Novoa <rnovoa@artica.es> +# Copyright (c) 2007-2008 Artica Soluciones Tecnologicas S.L. +# +# tentacle_client.pl Tentacle Client. See https://pandorafms.com/docs/ for +# protocol description. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +################################################################################ + +package tentacle::client; + +=head1 NAME + +tentacle_client - Tentacle Client + +=head1 VERSION + +Version 0.4.0 + +=head1 USAGE + +tentacle_client [options] [file] [file] ... + +=head1 DESCRIPTION + +B<tentacle_client(1)> is a client for B<tentacle>, a B<client/server> file transfer protocol that aims to be: + +=over + +=item * Secure by design. + +=item * Easy to use. + +=item * Versatile and cross-platform. + +=back + +Tentacle was created to replace more complex tools like SCP and FTP for simple file transfer/retrieval, and switch from authentication mechanisms like .netrc, interactive logins and SSH keys to X.509 certificates. Simple password authentication over a SSL secured connection is supported too. + +The client and server (B<TCP port 41121>) are designed to be run from the command line or called from a shell script, and B<no configuration files are needed>. + +If IO::Socket::INET6 is installed, the tentacle client supports IPv6. + +=cut + +use strict; +use File::Basename; +use Getopt::Std; +use IO::Select; +my $zlib_available = 1; + +eval { + eval "use IO::Compress::Zip qw(zip);1" or die($@); + eval "use IO::Uncompress::Unzip qw(unzip);1" or die($@); +}; +if ($@) { + print_log ("Zip transfer not available, required libraries not found (IO::Compress::Zip, IO::Uncompress::Unzip)."); + $zlib_available = 0; +} + +use Socket (qw(SOCK_STREAM AF_INET AF_INET6)); +my $SOCKET_MODULE = + eval { require IO::Socket::INET6 } ? 'IO::Socket::INET6' + : eval { require IO::Socket::INET } ? 'IO::Socket::INET' + : die $@; + +if ($SOCKET_MODULE eq 'IO::Socket::INET') { + print_log ("IO::Socket::INET6 is not found. IPv6 is disabled."); +} + +# Program version +our $VERSION = '0.4.0'; + +# Server address +my $t_address = '127.0.0.1'; + +# Block size for socket read/write operations in bytes +my $t_block_size = 1024; + +# Log messages, 1 enabled, 0 disabled +my $t_log = 0; + +# Server port +my $t_port = 41121; + +# Do not output error messages, 1 enabled, 0 disabled +my $t_quiet = 0; + +# Proxy address +my $t_proxy_address = ''; + +# Proxy user +my $t_proxy_user = ''; + +# Proxy password +my $t_proxy_pass = ''; + +# Proxy port +my $t_proxy_port = 0; + +# Server password +my $t_pwd = ''; + +# Receive mode, 1 enabled, 0 disabled +my $t_recv = 0; + +# Retries for socket read/write operations +my $t_retries = 3; + +# Select handler +my $t_select; + +# Server socket +my $t_socket; + +# Use SSL, 1 true, 0 false +my $t_ssl = 0; + +# SSL ca certificate file +my $t_ssl_ca = ''; + +# SSL certificate file +my $t_ssl_cert = ''; + +# SSL private key file +my $t_ssl_key = ''; + +# SSL private key file password +my $t_ssl_pwd = ''; + +# Timeout for socket read/write operations in seconds +my $t_timeout = 1; + +# bind ipaddr +my $t_bind_address = undef; + +# Compress data before sending it through the socket. +my $t_zip = 0; + +################################################################################ +## SUB print_help +## Print help screen. +################################################################################ +sub print_help { + + print ("Usage: $0 [options] [file] [file] ...\n\n"); + print ("Tentacle client v$VERSION. See https://pandorafms.com/docs/ for protocol description.\n\n"); + print ("Options:\n"); + print ("\t-a address\tServer address (default $t_address).\n"); + print ("\t-b localaddress\tLocal address to bind.\n"); + print ("\t-c\t\tEnable SSL without a client certificate.\n"); + print ("\t-e cert\t\tOpenSSL certificate file. Enables SSL.\n"); + print ("\t-f ca\t\tVerify that the peer certificate is signed by a ca.\n"); + print ("\t-g\t\tGet files from the server.\n"); + print ("\t-h\t\tShow help.\n"); + print ("\t-k key\t\tOpenSSL private key file.\n"); + print ("\t-p port\t\tServer port (default $t_port).\n"); + print ("\t-q\t\tQuiet. Do now print error messages.\n"); + print ("\t-r number\tNumber of retries for network operations (default $t_retries).\n"); + print ("\t-t time\t\tTime-out for network operations in seconds (default ${t_timeout}s).\n"); + print ("\t-v\t\tBe verbose.\n"); + print ("\t-w\t\tPrompt for OpenSSL private key password.\n"); + print ("\t-x pwd\t\tServer password.\n"); + print ("\t-y proxy\tProxy server string (user:password\@address:port).\n"); + print ("\t-z Compress data.\n\n"); +} + +################################################################################ +## SUB parse_options +## Parse command line options and initialize global variables. +################################################################################ +sub parse_options { + my %opts; + my $tmp; + + # Get options + if (getopts ('a:b:ce:f:ghk:p:qr:t:vwx:y:z', \%opts) == 0 || defined ($opts{'h'})) { + print_help (); + exit 1; + } + + # Address + if (defined ($opts{'a'})) { + $t_address = $opts{'a'}; + if (($t_address !~ /^[a-zA-Z\.][a-zA-Z0-9\.\-]+$/ && ($t_address !~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ + || $1 < 0 || $1 > 255 || $2 < 0 || $2 > 255 + || $3 < 0 || $3 > 255 || $4 < 0 || $4 > 255)) && + ($t_address !~ /^[0-9a-f:]+$/o)) { + error ("Address $t_address is not valid."); + } + + } + + # Bind local address + if (defined ($opts{'b'})) { + $t_bind_address = $opts{'b'}; + if (($t_bind_address !~ /^[a-zA-Z\.][a-zA-Z0-9\.\-]+$/ && ($t_bind_address !~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ + || $1 < 0 || $1 > 255 || $2 < 0 || $2 > 255 + || $3 < 0 || $3 > 255 || $4 < 0 || $4 > 255)) && + ($t_address !~ /^[0-9a-f:]+$/o)) { + error ("Local address $t_bind_address is not valid."); + } + + } + + # Enable SSL without a client certificate + if (defined ($opts{'c'})) { + require IO::Socket::SSL; + $t_ssl = 1; + } + + # Enable SSL + if (defined ($opts{'e'})) { + + if (defined ($opts{'c'})) { + error ("Flags -c and -e can not be used at the same time."); + } + + require IO::Socket::SSL; + + $t_ssl_cert = $opts{'e'}; + if (! -f $t_ssl_cert) { + error ("File $t_ssl_cert does not exist."); + } + + $t_ssl = 1; + } + + # Verify peer certificate + if (defined ($opts{'f'})) { + + if (! defined ($opts{'e'})) { + error ("Flag -e must be set to enable peer certificate verify."); + } + + $t_ssl_ca = $opts{'f'}; + if (! -f $t_ssl_ca) { + error ("File $t_ssl_ca does not exist."); + } + } + + # Get files + if (defined ($opts{'g'})) { + $t_recv = 1; + } + + # SSL private key file + if (defined ($opts{'k'})) { + + if (! defined ($opts{'e'})) { + error ("Flag -e must be set to use a private key file."); + } + + $t_ssl_key = $opts{'k'}; + if (! -f $t_ssl_key) { + error ("File $t_ssl_key does not exist."); + } + } + + # Port + if (defined ($opts{'p'})) { + $t_port = $opts{'p'}; + if ($t_port !~ /^\d+$/ || $t_port < 1 || $t_port > 65535) { + error ("Port $t_port is not valid."); + } + } + + # Quiet mode + if (defined ($opts{'q'})) { + $t_quiet = 1; + } + + # Retries + if (defined ($opts{'r'})) { + $t_retries = $opts{'r'}; + if ($t_retries !~ /^\d+$/ || $t_retries < 1) { + error ("Invalid number of retries for network operations."); + } + } + + # Timeout + if (defined ($opts{'t'})) { + $t_timeout = $opts{'t'}; + if ($t_timeout !~ /^\d+$/ || $t_timeout < 1) { + error ("Invalid timeout for network operations."); + } + } + + # Be verbose + if (defined ($opts{'v'})) { + $t_log = 1; + } + + # SSL private key password + if (defined ($opts{'w'})) { + + if (! defined ($opts{'e'})) { + error ("Flag -k must be set to provide a private key password."); + } + + $t_ssl_pwd = ask_passwd ("Enter private key file password: ", "Enter private key file password again for confirmation: "); + } + + # Server password + if (defined ($opts{'x'})) { + $t_pwd = $opts{'x'}; + } + + # Proxy server + if (defined ($opts{'y'})) { + if ($opts{'y'} !~ /^((.*):(.*)@){0,1}(\S+):(\d+)$/) { + error ("Invalid proxy string: " . $opts{'y'}); + } + + ($t_proxy_user, $t_proxy_pass, $t_proxy_address, $t_proxy_port) = ($2, $3, $4, $5); + $t_proxy_user = '' unless defined ($t_proxy_user); + $t_proxy_pass = '' unless defined ($t_proxy_pass); + if ($t_proxy_port < 1 || $t_proxy_port > 65535) { + error ("Proxy port $t_proxy_port is not valid."); + } + } + + # Compress data + if (defined ($opts{'z'})) { + if ($zlib_available == 1) { + $t_zip = 1; + } + } +} + +################################################################################ +## SUB start_client +## Open the server socket. +################################################################################ +sub start_client { + + # Connect to server + if ($SOCKET_MODULE ne 'IO::Socket::INET') { + if (defined ($t_bind_address)) { + $t_socket = $SOCKET_MODULE->new ( + Domain => AF_INET6, + PeerAddr => $t_address, + PeerPort => $t_port, + LocalAddr => $t_bind_address, + Type => SOCK_STREAM + ); + } + else { + $t_socket = $SOCKET_MODULE->new ( + Domain => AF_INET6, + PeerAddr => $t_address, + PeerPort => $t_port, + Type => SOCK_STREAM + ); + } + } + if (! defined ($t_socket)) { + if (defined ($t_bind_address)) { + $t_socket = $SOCKET_MODULE->new ( + Domain => AF_INET, + PeerAddr => $t_address, + PeerPort => $t_port, + LocalAddr => $t_bind_address, + Type => SOCK_STREAM + ); + } + else { + $t_socket = $SOCKET_MODULE->new ( + Domain => AF_INET, + PeerAddr => $t_address, + PeerPort => $t_port, + Type => SOCK_STREAM + ); + } + } + + if (! defined ($t_socket)) { + error ("Cannot connect to $t_address on port $t_port: $!."); + } + + # Add server socket to select queue + $t_select = IO::Select->new (); + $t_select->add ($t_socket); + + print_log ("Connected to $t_address port $t_port"); +} + +################################################################################ +## SUB start_client_proxy +## Open the server socket. Connects to the Tentacle server through an HTTP proxy. +################################################################################ +sub start_client_proxy { + + # Connect to proxy + if ($SOCKET_MODULE ne 'IO::Socket::INET') { + if (defined ($t_bind_address)) { + $t_socket = $SOCKET_MODULE->new ( + Domain => AF_INET6, + PeerAddr => $t_proxy_address, + PeerPort => $t_proxy_port, + LocalAddr => $t_bind_address, + ); + } + else { + $t_socket = $SOCKET_MODULE->new ( + Domain => AF_INET6, + PeerAddr => $t_proxy_address, + PeerPort => $t_proxy_port, + ); + } + } + if (! defined ($t_socket)) { + if (defined ($t_bind_address)) { + $t_socket = $SOCKET_MODULE->new ( + Domain => AF_INET, + PeerAddr => $t_proxy_address, + PeerPort => $t_proxy_port, + LocalAddr => $t_bind_address, + ); + } + else { + $t_socket = $SOCKET_MODULE->new ( + Domain => AF_INET, + PeerAddr => $t_proxy_address, + PeerPort => $t_proxy_port, + ); + } + } + + if (! defined ($t_socket)) { + error ("Cannot connect to proxy server $t_proxy_address on port $t_proxy_port: $!."); + } + + # Add server socket to select queue + $t_select = IO::Select->new (); + $t_select->add ($t_socket); + + print_log ("Connected to proxy server $t_proxy_address port $t_proxy_port"); + + # Try to CONNECT to the Tentacle server + send_data ("CONNECT " . $t_address . ":" . $t_port . " HTTP/1.0\r\n"); + + # Authenticate to the proxy + if ($t_proxy_user ne '') { + send_data ("Proxy-Authorization: Basic " . base64 ($t_proxy_user . ":" . $t_proxy_pass) . "\r\n"); + } + + send_data ("\r\n"); + + # Check for an HTTP 200 response + my $response = recv_data ($t_block_size); + if ($response !~ m/HTTP.* 200 /) { + my $error = (split (/\r\n/, $response))[0]; + error ("CONNECT error: $error"); + } + + print_log ("Connected to $t_address port $t_port"); +} + +################################################################################ +## SUB stop_client +## Close the server socket. +################################################################################ +sub stop_client { + + $t_socket->shutdown(2); + $t_socket->close (); +} + +################################################################################ +## SUB start_ssl +## Convert the server socket to an IO::Socket::SSL socket. +################################################################################ +sub start_ssl { + my $err; + + if ($t_ssl_cert eq ''){ + IO::Socket::SSL->start_SSL ( + $t_socket, + # No authentication + SSL_verify_mode => 0x00, + ); + } + elsif ($t_ssl_ca eq '') { + IO::Socket::SSL->start_SSL ( + $t_socket, + SSL_cert_file => $t_ssl_cert, + SSL_key_file => $t_ssl_key, + SSL_passwd_cb => sub {return $t_ssl_pwd}, + SSL_use_cert =>'1', + # No authentication + SSL_verify_mode => 0x00, + ); + } + else { + IO::Socket::SSL->start_SSL ( + $t_socket, + SSL_ca_file => $t_ssl_ca, + SSL_cert_file => $t_ssl_cert, + SSL_key_file => $t_ssl_key, + SSL_passwd_cb => sub {return $t_ssl_pwd}, + SSL_use_cert =>'1', + # Verify peer + SSL_verify_mode => 0x01, + ); + } + + $err = IO::Socket::SSL::errstr (); + if ($err ne '') { + error ($err); + } +} + +################################################################################ +## SUB auth_pwd +## Authenticate client with server password. +################################################################################ +sub auth_pwd { + my $command; + my $pwd_digest; + + require Digest::MD5; + + $pwd_digest = Digest::MD5::md5 ($t_pwd); + $pwd_digest = Digest::MD5::md5_hex ($pwd_digest); + + send_data ("PASS $pwd_digest\n"); + + $command = recv_command ($t_block_size); + if ($command !~ /^PASS OK$/) { + error ("Authentication failed."); + } +} + +################################################################################ +## SUB base64 +## Returns the base 64 encoding of a string. +################################################################################ +my @alphabet = ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', + 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'); +sub base64 { + my $str = shift; + my $str64; + + # Pre-processing + my $msg = unpack ("B*", pack ("A*", $str)); + my $bit_len = length ($msg); + + # Process the message in successive 24-bit chunks + for (my $i = 0; $i < $bit_len; $i += 24) { + my $chunk_len = length (substr ($msg, $i, 24)); + $str64 .= $alphabet[ord (pack ("B8", "00" . substr ($msg, $i, 6)))]; + $str64 .= $alphabet[ord (pack ("B8", "00" . substr ($msg, $i+6, 6)))]; + $str64 .= ($chunk_len <= 12) ? "=" : $alphabet[ord (pack ("B8", "00" . substr ($msg, $i+12, 6)))]; + $str64 .= ($chunk_len <= 18) ? "=" : $alphabet[ord (pack ("B8", "00" . substr ($msg, $i+18, 6)))]; + } + + return $str64; +} + + +################################################################################ +## SUB recv_file +## Receive a file from the server +################################################################################ +sub recv_file { + my $data = ''; + my $file = $_[0]; + my $response; + my $size; + + # Request file + send_data ("RECV <$file>\n"); + + # Wait for server response + $response = recv_command (); + if ($response !~ /^RECV SIZE (\d+)$/) { + error ("Server responded $response."); + } + + $size = $1; + send_data ("RECV OK\n"); + + # Receive file + $data = recv_data_block ($size); + + # Write it to disk + open (FILE, "> $file") || error ("Cannot open file '$file' for writing."); + binmode (FILE); + print (FILE $data); + close (FILE); + + print_log ("Received file '$file'"); +} + +################################################################################ +## SUB zrecv_file +## Receive a compressed file from the server +################################################################################ +sub zrecv_file { + my $data = ''; + my $file = $_[0]; + my $response; + my $size; + my $zdata = ''; + + # Request file + send_data ("ZRECV <$file>\n"); + + # Wait for server response + $response = recv_command (); + if ($response !~ /^ZRECV SIZE (\d+)$/) { + error ("Server responded $response."); + } + + $size = $1; + send_data ("ZRECV OK\n"); + + # Receive file + $zdata = recv_data_block ($size); + if (!unzip(\$zdata => \$data)) { + print_log ("Uncompress error: $IO::Uncompress::Unzip::UnzipError"); + send_data ("ZRECV ERR\n"); + return; + } + + # Write it to disk + open (FILE, "> $file") || error ("Cannot open file '$file' for writing."); + binmode (FILE); + print (FILE $data); + close (FILE); + + print_log ("Received compressed file '$file'"); +} + +################################################################################ +## SUB send_file +## Send a file to the server +################################################################################ +sub send_file { + my $base_name; + my $data = ''; + my $response = ''; + my $retries; + my $file = $_[0]; + my $size; + my $written; + + $base_name = basename ($file); + $size = -s $file; + + # Request to send file + send_data ("SEND <$base_name> SIZE $size\n"); + + print_log ("Request to send file '$base_name' size ${size}b"); + + # Wait for server response + $response = recv_command (); + + # Server rejected the file + if ($response ne "SEND OK") { + send_data ("QUIT\n"); + error ("Server responded $response."); + } + + print_log ("Server responded SEND OK"); + + # Send the file + open (FILE, $file) || error ("Cannot open file '$file' for reading."); + binmode (FILE); + { + local $/ = undef; + $data = <FILE>; + } + send_data ($data); + + close (FILE); + + # Wait for server response + $response = recv_command (); + if ($response ne "SEND OK") { + send_data ("QUIT\n"); + error ("Server responded $response."); + } + + print_log ("File sent"); +} + +################################################################################ +## SUB zsend_file +## Send a file to the server (compressed) +################################################################################ +sub zsend_file { + my $base_name; + my $data = ''; + my $response = ''; + my $retries; + my $file = $_[0]; + my $size; + my $written; + + # Read the file and compress its contents + if (! zip($file => \$data)) { + send_data ("QUIT\n"); + error ("Compression error: $IO::Compress::Zip::ZipError"); + return; + } + + $size = length($data); + $base_name = basename ($file); + + # Request to send file + send_data ("ZSEND <$base_name> SIZE $size\n"); + print_log ("Request to send file '$base_name' size ${size}b (compressed)"); + + # Wait for server response + $response = recv_command (); + + # Server rejected the file + if ($response ne "ZSEND OK") { + send_data ("QUIT\n"); + error ("Server responded $response."); + } + + print_log ("Server responded ZSEND OK"); + send_data ($data); + + # Wait for server response + $response = recv_command (); + if ($response ne "ZSEND OK") { + send_data ("QUIT\n"); + error ("Server responded $response."); + } + + print_log ("File sent"); +} + +################################################################################ +# Common functions +################################################################################ + +################################################################################ +## SUB print_log +## Print log messages. +################################################################################ +sub print_log { + + if ($t_log == 1) { + print (STDOUT "[log] $_[0]\n"); + } +} + +################################################################################ +## SUB error +## Print an error and exit the program. +################################################################################ +sub error { + + if ($t_quiet == 0) { + print (STDERR "[err] $_[0]\n"); + } + + exit 1; +} + +################################################################################ +## SUB recv_data +## Read data from the client socket. Returns the number of bytes read and the +## string of bytes as a two element array. +################################################################################ +sub recv_data { + my $data; + my $read; + my $retries = 0; + my $size = $_[0]; + + while (1) { + + # Try to read data from the socket + if ($t_select->can_read ($t_timeout)) { + + # Read at most $size bytes + $read = sysread ($t_socket, $data, $size); + + # Read error + if (! defined ($read)) { + error ("Read error from " . $t_socket->sockhost () . ": $!."); + } + + # EOF + if ($read == 0) { + error ("Connection from " . $t_socket->sockhost () . " unexpectedly closed."); + } + + return ($read, $data); + } + + # Retry + $retries++; + + # But check for error conditions first + if ($retries > $t_retries) { + error ("Connection from " . $t_socket->sockhost () . " timed out."); + } + } +} + +################################################################################ +## SUB send_data +## Write data to the client socket. +################################################################################ +sub send_data { + my $data = $_[0]; + my $block_size; + my $retries = 0; + my $size; + my $total = 0; + my $written; + + $size = length ($data); + + while (1) { + + # Try to write data to the socket + if ($t_select->can_write ($t_timeout)) { + + $block_size = ($size - $total) > $t_block_size ? $t_block_size : ($size - $total); + $written = syswrite ($t_socket, $data, $block_size, $total); + + # Read error + if (! defined ($written)) { + error ("Connection error from " . $t_socket->sockhost () . ": $!."); + } + + # EOF + if ($written == 0) { + error ("Connection from " . $t_socket->sockhost () . " unexpectedly closed."); + } + + $total += $written; + + # All data was written + if ($total == $size) { + return; + } + # Retry + } else { + $retries++; + if ($retries > $t_retries) { + error ("Connection from " . $t_socket->sockhost () . " timed out."); + } + } + } +} + +################################################################################ +## SUB recv_command +## Read a command from the client, ended by a new line character. +################################################################################ +sub recv_command { + my $buffer; + my $char; + my $command = ''; + my $read; + my $total = 0; + + while (1) { + + ($read, $buffer) = recv_data ($t_block_size); + $command .= $buffer; + $total += $read; + + # Check if the command is complete + $char = chop ($command); + if ($char eq "\n") { + return $command; + } + + $command .= $char; + + # Avoid overflow + if ($total > $t_block_size) { + error ("Received too much data from " . $t_socket->sockhost ()); + } + } +} + +################################################################################ +## SUB recv_data_block +## Read $_[0] bytes of data from the client. +################################################################################ +sub recv_data_block { + my $buffer = ''; + my $data = ''; + my $read; + my $size = $_[0]; + my $total = 0; + + while (1) { + + ($read, $buffer) = recv_data ($size - $total); + $data .= $buffer; + $total += $read; + + # Check if all data has been read + if ($total == $size) { + return $data; + } + } +} + +################################################################################ +## SUB ask_passwd +## Asks the user for a password. +################################################################################ +sub ask_passwd { + my $msg1 = $_[0]; + my $msg2 = $_[1]; + my $pwd1; + my $pwd2; + + require Term::ReadKey; + + # Disable keyboard echo + Term::ReadKey::ReadMode('noecho'); + + # Promt for password + print ($msg1); + $pwd1 = Term::ReadKey::ReadLine(0); + print ("\n$msg2"); + $pwd2 = Term::ReadKey::ReadLine(0); + print ("\n"); + + # Restore original settings + Term::ReadKey::ReadMode('restore'); + + if ($pwd1 ne $pwd2) { + # Call print to bypass quiet mode. + print ("[err] Passwords do not match.\n"); + exit 1; + } + + # Remove the trailing new line character + chop $pwd1; + + return $pwd1; +} + +################################################################################ +# Main +################################################################################ + +my $file; + +# Parse command line options +parse_options (); + +# Check command line arguments +if ($t_recv == 0 && $#ARGV == -1) { + error ("No files to send."); +} + +# Connect to the server +if ($t_proxy_address eq '') { + start_client (); +} else { + start_client_proxy (); +} + +# Start SSL +if ($t_ssl == 1) { + start_ssl (); +} + +# Authenticate with server +if ($t_pwd ne '') { + auth_pwd (); +} + +if ($t_recv == 0) { + # Check that all files exist before trying to send them + foreach $file (@ARGV) { + if (! -f $file) { + error ("File '$file' does not exist."); + } + } + + # Send the files + foreach $file (@ARGV) { + if ($t_zip == 1) { + zsend_file($file); + } else { + send_file ($file); + } + } +} +else { + # Receive the files + foreach $file (@ARGV) { + if ($t_zip == 1) { + zrecv_file ($file); + } else { + recv_file ($file); + } + } +} + +# Tell the server that we are finished +send_data ("QUIT\n"); + +stop_client (); + +exit 0; + + +__END__ + +=head1 OPTIONS + +=over + +=item I<-a address> B<Server address> (default 127.0.0.1). + +=item I<-c> Enable B<SSL> without a client certificate. + +=item I<-e cert> B<OpenSSL certificate> file. Enables SSL. + +=item I<-f ca> Verify that the peer certificate is signed by a B<CA> (Certificate Authority). + +=item I<-g> B<Get> files from the server. + +=item I<-h> Show B<help>. + +=item I<-k key> B<OpenSSL private key> file. + +=item I<-p port> B<Server port> (default I<41121>). + +=item I<-q> B<Quiet>. Do now print error messages. + +=item I<-r number> B<Number of retries> for network operations (default I<3>). + +=item I<-t time> B<Time-out> for network operations in seconds (default I<1s>). + +=item I<-v> Be B<verbose>. + +=item I<-w> Prompt for B<OpenSSL private key password>. + +=item I<-x pwd> B<Server password>. + +=item I<-z> Compress data. + +=back + +=head1 EXIT STATUS + +=over + +=item 0 on Success + +=item 1 on Error + +=back + +=head1 CONFIGURATION + +Tentacle doesn't use any configurationf files, all the configuration is done by the options passed when it's started. + +=head1 DEPENDENCIES + +L<Getopt::Std>, L<IO::Select>, L<IO::Socket::INET>, L<File::Basename> + +=head1 LICENSE + +This is released under the GNU Lesser General Public License. + +=head1 SEE ALSO + +L<Getopt::Std>, L<IO::Select>, L<IO::Socket::INET>, L<File::Basename> + +Protocol description and more info at: L<< https://pandorafms.com/docs/index.php?title=Pandora:Documentation_en:Tentacle >> + +=head1 COPYRIGHT + +Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L + +=cut + diff --git a/tentacle/tentacle_server b/tentacle/tentacle_server new file mode 100755 index 0000000000..feb8ecf9af --- /dev/null +++ b/tentacle/tentacle_server @@ -0,0 +1,1884 @@ +#!/usr/bin/perl +########################################################################## +# Tentacle Server +# See https://pandorafms.com/docs/ for protocol description. +# Tentacle have IANA assigned port tpc/41121 as official port. +########################################################################## +# Copyright (c) 2007-2008 Ramon Novoa <rnovoa@artica.es> +# Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L +# +# tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for +# protocol description. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +########################################################################## + +package tentacle::server; +=head1 NAME + +tentacle_server - Tentacle Server + +=head1 VERSION + +Version 0.6.1 + +=head1 USAGE + +tentacle_server B<< -s F<storage_directory> >> [I<options>] + +=head1 DESCRIPTION + +B<tentacle_server(1)> is a server for B<tentacle>, a B<client/server> file transfer protocol that aims to be: + +=over + +=item * Secure by design. + +=item * Easy to use. + +=item * Versatile and cross-platform. + +=back + +Tentacle was created to replace more complex tools like SCP and FTP for simple file transfer/retrieval, and switch from authentication mechanisms like .netrc, interactive logins and SSH keys to X.509 certificates. Simple password authentication over a SSL secured connection is supported too. + +The client and server (B<TCP port 41121>) are designed to be run from the command line or called from a shell script, and B<no configuration files are needed>. + +=cut + +use strict; +use warnings; +use Getopt::Std; +use IO::Select; +use IO::Compress::Zip qw(zip $ZipError); +use IO::Uncompress::Unzip qw(unzip $UnzipError); +use threads; +use Thread::Semaphore; +use POSIX ":sys_wait_h"; +use Time::HiRes qw(usleep); +use Scalar::Util qw(refaddr); +use POSIX qw(strftime); + +# Constants for Win32 services. +use constant WIN32_SERVICE_STOPPED => 0x01; +use constant WIN32_SERVICE_RUNNING => 0x04; + +my $t_libwrap_installed = eval { require Authen::Libwrap } ? 1 : 0; + +if ($t_libwrap_installed) { + Authen::Libwrap->import( qw( hosts_ctl STRING_UNKNOWN ) ); +} + +# Log errors, 1 enabled, 0 disabled +my $t_log = 0; + +# Log information, 1 enabled, 0 enabled +my $t_log_hard = 0; + +my $SOCKET_MODULE; +if ($^O eq 'MSWin32') { + # Only support INET on windows + require IO::Socket::INET; + $SOCKET_MODULE = 'IO::Socket::INET'; +} else { + $SOCKET_MODULE = + eval { require IO::Socket::INET6 } ? 'IO::Socket::INET6' + : eval { require IO::Socket::INET } ? 'IO::Socket::INET' + : die $@; +} + +# Service name for Win32. +my $SERVICE_NAME="Tentacle Server"; + +# Service parameters. +my $SERVICE_PARAMS=join(' ', @ARGV); + +# Program version +our $VERSION = '0.6.2'; + +# IPv4 address to listen on +my @t_addresses = ('0', '0.0.0.0'); + +# Block size for socket read/write operations in bytes +my $t_block_size = 1024; + +# Client socket +my $t_client_socket; + +# Run as daemon, 1 true, 0 false +my $t_daemon = 0; + +# Storage directory +my $t_directory = ''; + +# Filters +my @t_filters; + +# Enable (1) or disable (0) insecure mode +my $t_insecure = 0; + +# String containing quoted invalid file name characters +my $t_invalid_chars = '\?\[\]\/\\\=\+\<\>\:\;\'\,\*\~'; + +# Maximum number of simultaneous connections +my $t_max_conn = 10; + +# Maximum file size allowed by the server in bytes +my $t_max_size = 2000000; + +# File overwrite, 1 enabled, 0 disabled +my $t_overwrite = 0; + +# Port to listen on +my $t_port = 41121; + +# Server password +my $t_pwd = ''; + +# Do not output error messages, 1 enabled, 0 disabled +my $t_quiet = 0; + +# Number of retries for socket read/write operations +my $t_retries = 3; + +# Select handler +my $t_select; + +# Semaphore +my $t_sem :shared; + +# Server socket +my @t_server_sockets; + +# Server select handler +my $t_server_select; + +# Use SSL, 1 true, 0 false +my $t_ssl = 0; + +# SSL ca certificate file +my $t_ssl_ca = ''; + +# SSL certificate file +my $t_ssl_cert = ''; + +# SSL private key file +my $t_ssl_key = ''; + +# SSL private key password +my $t_ssl_pwd = ''; + +# Timeout for socket read/write operations in seconds +my $t_timeout = 1; + +# Address to proxy client requests to +my $t_proxy_ip = undef; + +# Port to proxy client requests to +my $t_proxy_port = 41121; + +# Proxy socket +my $t_proxy_socket; + +# Proxy selected handler +my $t_proxy_select; + +# Use libwrap, 1 true, 0 false +my $t_use_libwrap = 0; + +# Program name for libwrap +my $t_program_name = $0; +$t_program_name =~ s/.*\///g; + +# Log file +my $log_file = undef; + +################################################################################ +## SUB print_help +## Print help screen. +################################################################################ +sub print_help { + $" = ','; + + print ("Usage: $0 -s <storage directory> [options]\n\n"); + print ("Tentacle server v$VERSION. See https://pandorafms.com/docs/ for protocol description.\n\n"); + print ("Options:\n"); + print ("\t-a ip_addresses\tIP addresses to listen on (default @t_addresses).\n"); + print ("\t \t(Multiple addresses separated by comma can be defined.)\n"); + print ("\t-c number\tMaximum number of simultaneous connections (default $t_max_conn).\n"); + print ("\t-d\t\tRun as daemon.\n"); + print ("\t-e cert\t\tOpenSSL certificate file. Enables SSL.\n"); + print ("\t-f ca_cert\tVerify that the peer certificate is signed by a ca.\n"); + print ("\t-F config_file\tConfiguration file full path.\n"); + print ("\t-h\t\tShow help.\n"); + print ("\t-I\t\tEnable insecure operations (file listing and moving).\n"); + print ("\t-i\t\tFilters.\n"); + print ("\t-k key\t\tOpenSSL private key file.\n"); + print ("\t-l log_file\t\tFile to write logs.\n"); + print ("\t-m size\t\tMaximum file size in bytes (default ${t_max_size}b).\n"); + print ("\t-o\t\tEnable file overwrite.\n"); + print ("\t-p port\t\tPort to listen on (default $t_port).\n"); + print ("\t-q\t\tQuiet. Do now print error messages.\n"); + print ("\t-r number\tNumber of retries for network opertions (default $t_retries).\n"); + print ("\t-S (install|uninstall|run) Manage the win32 service.\n"); + print ("\t-t time\t\tTime-out for network operations in seconds (default ${t_timeout}s).\n"); + print ("\t-v\t\tBe verbose (display errors).\n"); + print ("\t-V\t\tBe verbose on hard way (display errors and other info).\n"); + print ("\t-w\t\tPrompt for OpenSSL private key password.\n"); + print ("\t-x pwd\t\tServer password.\n"); + print ("\t-b ip_address\tProxy requests to the given address.\n"); + print ("\t-g port\t\tProxy requests to the given port.\n"); + print ("\t-T\t\tEnable tcpwrappers support.\n"); + print ("\t \t\t(To use this option, 'Authen::Libwrap' should be installed.)\n\n"); +} + +################################################################################ +## SUB daemonize +## Turn the current process into a daemon. +################################################################################ +sub daemonize { + my $pid; + + require POSIX; + + chdir ('/') || error ("Cannot chdir to /: $!."); + umask 0; + + open (STDIN, '/dev/null') || error ("Cannot read /dev/null: $!."); + + # Do not be verbose when running as a daemon + open (STDOUT, '>/dev/null') || error ("Cannot write to /dev/null: $!."); + open (STDERR, '>/dev/null') || error ("Cannot write to /dev/null: $!."); + + # Fork + $pid = fork (); + if (! defined ($pid)) { + error ("Cannot fork: $!."); + } + + # Parent + if ($pid != 0) { + exit; + } + + # Child + POSIX::setsid () || error ("Cannot start a new session: $!."); +} + +################################################################################ +## SUB parse_options +## Parse command line options and initialize global variables. +################################################################################ +sub parse_options { + my %opts; + my $CONF = {}; + my $token_value; + my $tmp; + my @t_addresses_tmp; + + # Get options + if (getopts ('a:b:c:de:f:F:g:hIi:k:l:m:op:qr:s:S:t:TvVwx:', \%opts) == 0 || defined ($opts{'h'})) { + print_help (); + exit 1; + } + + # The Win32 service must be installed/uninstalled without checking other parameters. + if (defined ($opts{'S'})) { + my $service_action = $opts{'S'}; + if ($^O ne 'MSWin32') { + error ("Windows services are only available on Win32."); + } else { + eval "use Win32::Daemon"; + die($@) if ($@); + + if ($service_action eq 'install') { + install_service(); + } elsif ($service_action eq 'uninstall') { + uninstall_service(); + } + } + } + + # Configuration file + if (defined($opts{'F'})) { + parse_config_file($opts{'F'}, $CONF); + } + + # Address + $token_value = get_config_value($opts{'a'}, $CONF->{'addresses'}); + if (defined ($token_value)) { + @t_addresses = (); + @t_addresses_tmp = split(/,/, $token_value); + + foreach my $t_address (@t_addresses_tmp) { + $t_address =~ s/^ *(.*?) *$/$1/; + if (($t_address ne '0') && + ($t_address !~ /^[a-zA-Z\.]+$/ && ($t_address !~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ + || $1 < 0 || $1 > 255 || $2 < 0 || $2 > 255 + || $3 < 0 || $3 > 255 || $4 < 0 || $4 > 255)) && + ($t_address !~ /^[0-9a-f:]+$/o)) { + error ("Address $t_address is not valid."); + } + push @t_addresses, $t_address; + } + } + + # Maximum simultaneous connections + $token_value = get_config_value($opts{'c'}, $CONF->{'max_connections'}); + if (defined ($token_value)) { + $t_max_conn = $token_value; + if ($t_max_conn !~ /^\d+$/ || $t_max_conn < 1) { + error ("Invalid number of maximum simultaneous connections."); + } + } + + # Run as daemon + $token_value = get_config_value($opts{'d'}, $CONF->{'daemon'}, 1); + if (defined ($token_value)) { + if ($^ eq 'MSWin32') { + error ("-d flag not available for this OS."); + } + + $t_daemon = 1; + } + + # Enable SSL + $token_value = get_config_value($opts{'e'}, $CONF->{'ssl_cert'}); + if (defined ($token_value)) { + + require IO::Socket::SSL; + + $t_ssl_cert = $token_value; + if (! -f $t_ssl_cert) { + error ("File $t_ssl_cert does not exist."); + } + + $t_ssl = 1; + } + + # Verify peer certificate + $token_value = get_config_value($opts{'f'}, $CONF->{'ssl_ca'}); + if (defined ($token_value)) { + $t_ssl_ca = $token_value; + if (! -f $t_ssl_ca) { + error ("File $t_ssl_ca does not exist."); + } + } + + # Insecure mode + $token_value = get_config_value($opts{'I'}, $CONF->{'insecure'}, 1); + if (defined ($token_value)) { + $t_insecure = 1; + } + + # Filters (regexp:dir;regexp:dir...) + $token_value = get_config_value($opts{'i'}, $CONF->{'filters'}); + if (defined ($token_value)) { + my @filters = split (';', $token_value); + foreach my $filter (@filters) { + my ($regexp, $dir) = split (':', $filter); + next unless defined ($regexp) && defined ($dir); + + # Remove any trailing / + my $char = chop ($dir); + $dir .= $char if ($char) ne '/'; + + push(@t_filters, [$regexp, $dir]); + } + } + + # SSL private key file + $token_value = get_config_value($opts{'k'}, $CONF->{'ssl_key'}); + if (defined ($token_value)) { + $t_ssl_key = $token_value; + if (! -f $t_ssl_key) { + error ("File $t_ssl_key does not exist."); + } + } + + # Maximum file size + $token_value = get_config_value($opts{'m'}, $CONF->{'max_size'}); + if (defined ($token_value)) { + $t_max_size = $token_value; + if ($t_max_size !~ /^\d+$/ || $t_max_size < 1) { + error ("Invalid maximum file size."); + } + } + + # File overwrite + $token_value = get_config_value($opts{'o'}, $CONF->{'overwrite'}, 1); + if (defined ($token_value)) { + $t_overwrite = 1; + } + + # Port + $token_value = get_config_value($opts{'p'}, $CONF->{'port'}); + if (defined ($token_value)) { + $t_port = $token_value; + if ($t_port !~ /^\d+$/ || $t_port < 1 || $t_port > 65535) { + error ("Port $t_port is not valid."); + } + } + + # Quiet mode + $token_value = get_config_value($opts{'q'}, $CONF->{'quiet'}, 1); + if (defined ($token_value)) { + $t_quiet = 1; + } + + # Retries + $token_value = get_config_value($opts{'r'}, $CONF->{'retries'}); + if (defined ($token_value)) { + $t_retries = $token_value; + if ($t_retries !~ /^\d+$/ || $t_retries < 1) { + error ("Invalid number of retries for network operations."); + } + } + + # Storage directory + $token_value = get_config_value($opts{'s'}, $CONF->{'directory'}); + if (defined ($token_value)) { + + $t_directory = $token_value; + + # Check that directory exists + if (! -d $t_directory) { + error ("Directory $t_directory does not exist."); + } + + # Check directory permissions + if (! -w $t_directory) { + error ("Cannot write to directory $t_directory."); + } + + # Remove the trailing / if present + $tmp = chop ($t_directory); + if ($tmp ne '/') { + $t_directory .= $tmp; + } + } + else { + $token_value = get_config_value($opts{'b'}, $CONF->{'proxy_ip'}); + if (! defined($token_value)) { + print_help (); + exit 1; + } + } + + # Timeout + $token_value = get_config_value($opts{'t'}, $CONF->{'timeout'}); + if (defined ($token_value)) { + $t_timeout = $token_value; + if ($t_timeout !~ /^\d+$/ || $t_timeout < 1) { + error ("Invalid timeout for network operations."); + } + } + + # Read verbose from config file + if (defined($CONF->{'verbose'})) { + if ($CONF->{'verbose'} eq "1") { + $t_log = 1; + } elsif ($CONF->{'verbose'} eq "2") { + $t_log = 1; + $t_log_hard = 1; + } + } + # Be verbose + if (defined ($opts{'v'})) { + $t_log = 1; + $t_log_hard = 0; + } + # Be verbose hard + if (defined ($opts{'V'})) { + $t_log = 1; + $t_log_hard = 1; + } + + # SSL private key password + $token_value = get_config_value($opts{'w'}, $CONF->{'ssl_password'}, 1); + if (defined ($token_value)) { + $t_ssl_pwd = ask_passwd ("Enter private key file password: ", "Enter private key file password again for confirmation: "); + } + + # Server password + $token_value = get_config_value($opts{'x'}, $CONF->{'password'}); + if (defined ($token_value)) { + $t_pwd = $token_value; + } + + #Proxy IP address + $token_value = get_config_value($opts{'b'}, $CONF->{'proxy_ip'}); + if (defined ($token_value)) { + $t_proxy_ip = $token_value; + if ($t_proxy_ip !~ /^[a-zA-Z\.]+$/ && ($t_proxy_ip !~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ + || $1 < 0 || $1 > 255 || $2 < 0 || $2 > 255 + || $3 < 0 || $3 > 255 || $4 < 0 || $4 > 255) && + $t_proxy_ip !~ /^[0-9a-f:]+$/o) { + error ("Proxy address $t_proxy_ip is not valid."); + } + } + + # Proxy Port + $token_value = get_config_value($opts{'g'}, $CONF->{'proxy_port'}); + if (defined ($token_value)) { + $t_proxy_port = $token_value; + if ($t_proxy_port !~ /^\d+$/ || $t_proxy_port < 1 || $t_proxy_port > 65535) { + error ("Proxy port $t_port is not valid."); + } + } + + # TCP wrappers support + $token_value = get_config_value($opts{'T'}, $CONF->{'use_libwrap'}, 1); + if (defined ($token_value)) { + if ($t_libwrap_installed) { + $t_use_libwrap = 1; + } else { + error ("Authen::Libwrap is not installed."); + } + } + + # Win32 service management + if (defined ($opts{'S'})) { + my $service_action = $opts{'S'}; + if ($^O ne 'MSWin32') { + error ("Windows services are only available on Win32."); + } else { + eval "use Win32::Daemon"; + die($@) if ($@); + + if ($service_action eq 'run') { + Win32::Daemon::RegisterCallbacks({ + start => \&callback_start, + running => \&callback_running, + stop => \&callback_stop, + }); + Win32::Daemon::StartService(); + exit 0; + } else { + error("Unknown action: $service_action"); + } + } + } + + # Get the config file + $token_value = get_config_value($opts{'l'}, $CONF->{'log_file'}); + if (defined ($token_value)) { + $log_file = $token_value; + } + + # No command lines config values + + # Get the block size + if (defined ($CONF->{'block_size'})) { + if ($t_port !~ /^\d+$/ || $t_port < 1) { + error ("Invalid block size: " . $CONF->{'block_size'} . "."); + } + $t_block_size = $CONF->{'block_size'}; + } + + # Configuration file invalid chars + if (defined ($CONF->{'invalid_chars'})) { + $t_invalid_chars = $CONF->{'invalid_chars'}; + } +} + +################################################################################ +## SUB parse_config_file +## Get all options from a config file. +################################################################################ +sub parse_config_file { + my ($config_file, $CONF) = @_; + + # File should be writable + if (! -r $config_file) { + print "Configuration file $config_file is not readable.\n"; + return; + } + + # Open the file + my $FH; + if (! open ($FH, "< $config_file")) { + print "Cannot open configuration file $config_file.\n"; + return; + } + + # Read the file and only get the well formed lines + while (<$FH>) { + my $buffer_line = $_; + if ($buffer_line =~ /^[a-zA-Z]/){ # begins with letters + if ($buffer_line =~ m/([\w\-\_\.]+)\s+(.*)/){ + $CONF->{$1} = $2 unless $2 eq ""; + } + } + } + + close ($FH); + return; +} + +################################################################################ +## SUB parse_config_file +## Search in command line options and config hash from configuration file +## to get a value (command line is a priority) +################################################################################ +sub get_config_value { + my ($cmd_value, $conf_value, $bool) = @_; + $bool = 0 unless defined($bool); + + return $cmd_value if defined($cmd_value); + # The boolean type value is 1 or undef (0 should be translated like undefP) + if ($bool && defined($conf_value)) { + return undef if ($conf_value ne "1"); + } + return $conf_value; +} + +################################################################################ +## SUB start_proxy +## Open the proxy server socket. +################################################################################ +sub start_proxy { + + # Connect to server + $t_proxy_socket = $SOCKET_MODULE->new ( + PeerAddr => $t_proxy_ip, + PeerPort => $t_proxy_port, + ); + + if (! defined ($t_proxy_socket)) { + error ("Cannot connect to $t_proxy_ip on port $t_proxy_port: $!."); + } + + # Create proxy selector + $t_proxy_select = IO::Select->new (); + $t_proxy_select->add ($t_proxy_socket); + +} + +################################################################################ +## SUB start_server +## Open the server socket. +################################################################################ +sub start_server { + + my $t_server_socket; + + foreach my $t_address (@t_addresses) { + + $t_server_socket = $SOCKET_MODULE->new ( + Listen => $t_max_conn, + LocalAddr => $t_address, + LocalPort => $t_port, + Proto => 'tcp', + ReuseAddr => 1, + ); + + if (! defined ($t_server_socket)) { + print_log ("Cannot open socket for address $t_address on port $t_port: $!."); + next; + } + + print_log ("Server listening on $t_address port $t_port (press <ctr-c> to stop)"); + + # Say message if tentacle proxy is enable + if (defined ($t_proxy_ip)) { + print_log ("Proxy Mode enable, data will be sent to $t_proxy_ip port $t_proxy_port"); + } + + push @t_server_sockets, $t_server_socket; + } + + if (!@t_server_sockets) { + error ("Cannot open socket for all addresses on port $t_port: $!."); + } + + $t_server_select = IO::Select->new(); + foreach my $t_server_socket (@t_server_sockets){ + $t_server_select->add($t_server_socket); + } +} + +################################################################################ +## SUB send_data_proxy +## Send data to proxy socket. +################################################################################ +sub send_data_proxy { + my $data = $_[0]; + my $block_size; + my $retries = 0; + my $size; + my $total = 0; + my $written; + + $size = length ($data); + + while (1) { + + # Try to write data to the socket + if ($t_proxy_select->can_write ($t_timeout)) { + + $block_size = ($size - $total) > $t_block_size ? $t_block_size : ($size - $total); + $written = syswrite ($t_proxy_socket, $data, $size - $total, $total); + + # Write error + if (! defined ($written)) { + error ("Connection error from " . $t_proxy_socket->sockhost () . ": $!."); + } + + # EOF + if ($written == 0) { + error ("Connection from " . $t_proxy_socket->sockhost () . " unexpectedly closed."); + } + + $total += $written; + + # Check if all data was written + if ($total == $size) { + return; + } + } + # Retry + else { + $retries++; + if ($retries > $t_retries) { + error ("Connection from " . $t_proxy_socket->sockhost () . " timed out."); + } + } + } +} + +################################################################################ +## SUB close_proxy +## Close the proxy socket. +################################################################################ +sub close_proxy { + $t_proxy_socket->shutdown (2); + $t_proxy_socket->close (); +} + +################################################################################ +## SUB stop_server +## Close the server socket. +################################################################################ +sub stop_server { + + foreach my $t_server_socket (@t_server_sockets) { + $t_server_socket->shutdown (2); + $t_server_socket->close (); + } + print_log ("Server going down"); + + exit 0; +} + +################################################################################ +## SUB start_ssl +## Convert the client socket to an IO::Socket::SSL socket. +################################################################################ +sub start_ssl { + my $err; + + if ($t_ssl_ca eq '') { + IO::Socket::SSL->start_SSL ( + $t_client_socket, + SSL_cert_file => $t_ssl_cert, + SSL_key_file => $t_ssl_key, + SSL_passwd_cb => sub {return $t_ssl_pwd}, + SSL_server => 1, + # Verify peer + SSL_verify_mode => 0x01, + ); + } + else { + IO::Socket::SSL->start_SSL ( + $t_client_socket, + SSL_ca_file => $t_ssl_ca, + SSL_cert_file => $t_ssl_cert, + SSL_key_file => $t_ssl_key, + SSL_passwd_cb => sub {return $t_ssl_pwd}, + SSL_server => 1, + # Fail verification if no peer certificate exists + SSL_verify_mode => 0x03, + ); + } + + $err = IO::Socket::SSL::errstr (); + if ($err ne '') { + error ($err); + } + + print_log ("SSL started for " . $t_client_socket->sockhost ()); +} + +################################################################################ +## SUB accept_connections +## Manage incoming connections. +################################################################################ +sub accept_connections { + my $pid; + my $t_server_socket; + + # Ignore SIGPIPE + $SIG{PIPE} = 'IGNORE'; + + # Start server + start_server (); + + # Initialize semaphore + $t_sem = Thread::Semaphore->new ($t_max_conn); + + while (1) { + my @ready = $t_server_select->can_read; + foreach $t_server_socket (@ready) { + + # Accept connection + $t_client_socket = $t_server_socket->accept (); + + if (! defined ($t_client_socket)) { + next if ($! ne ''); # EINTR + error ("accept: $!."); + } + + print_info ("Client connected from " . $t_client_socket->peerhost ()); + + if ($t_use_libwrap && (! hosts_ctl($t_program_name, $t_client_socket))) { + print_log ("Connection from " . $t_client_socket->peerhost() . " is closed by tcpwrappers."); + $t_client_socket->shutdown (2); + $t_client_socket->close(); + } + else { + + # Create a new thread and serve the client + $t_sem->down(); + my $thr = threads->create(\&serve_client); + if (! defined ($thr)) { + error ("Error creating thread: $!."); + } + $thr->detach(); + $t_client_socket->close (); + } + } + + usleep (1000); + } +} + +################################################################################ +## SUB serve_client +## Serve a connected client. +################################################################################ +sub serve_client() { + + eval { + # Add client socket to select queue + $t_select = IO::Select->new (); + $t_select->add ($t_client_socket); + + # Start SSL + if ($t_ssl == 1) { + start_ssl (); + } + + # Authenticate client + if ($t_pwd ne '') { + auth_pwd (); + } + + # Check if proxy mode is enable + if (defined ($t_proxy_ip)) { + serve_proxy_connection (); + } else { + serve_connection (); + } + }; + + $t_client_socket->shutdown (2); + $t_client_socket->close (); + $t_sem->up(); +} + +################################################################################ +## SUB serve_proxy_connection +## Actuate as a proxy between its client and other tentacle server. +################################################################################ +sub serve_proxy_connection { + + # We are a proxy! Start a connection to the Tentacle Server. + start_proxy(); + + # Forward data between the client and the server. + eval { + my $select = IO::Select->new (); + $select->add($t_proxy_socket); + $select->add($t_client_socket); + while (my @ready = $select->can_read()) { + foreach my $socket (@ready) { + if (refaddr($socket) == refaddr($t_client_socket)) { + my ($read, $data) = recv_data($t_block_size); + return unless defined($data); + send_data_proxy($data); + } + else { + my ($read, $data) = recv_data_proxy($t_block_size); + return unless defined($data); + send_data($data); + } + } + } + }; + + # Close the connection to the Tentacle Server. + close_proxy(); +} + +################################################################################ +## SUB serve_connection +## Read and process commands from the client. +################################################################################ +sub serve_connection { + my $command; + + # Read commands + while ($command = recv_command ($t_block_size)) { + + # Client wants to send a file + if ($command =~ /^SEND <(.*)> SIZE (\d+)$/) { + print_info ("Request to send file '$1' size ${2}b from " . $t_client_socket->sockhost ()); + recv_file ($1, $2); + } + # Client wants to receive a file + elsif ($command =~ /^RECV <(.*)>$/) { + print_info ("Request to receive file '$1' from " . $t_client_socket->sockhost ()); + send_file ($1); + } + elsif ($command =~ /^ZSEND <(.*)> SIZE (\d+)$/) { + print_info ("Request to send compressed file '$1' size ${2}b from " . $t_client_socket->sockhost ()); + zrecv_file ($1, $2); + } + # Client wants to receive a file + elsif ($command =~ /^ZRECV <(.*)>$/) { + print_info ("Request to receive compressed file '$1' from " . $t_client_socket->sockhost ()); + zsend_file ($1); + } + # Quit + elsif ($command =~ /^QUIT$/) { + print_info ("Connection closed from " . $t_client_socket->sockhost ()); + last; + } + # File listing. + elsif ($command =~ /^LS <(.*)>$/) { + if ($t_insecure == 0) { + print_info ("Insecure mode disabled. Rejected request to list files matched by filter $1 from " . $t_client_socket->sockhost ()); + last; + } + + print_info ("Request to list files matched by filter $1 from " . $t_client_socket->sockhost ()); + send_file_list ($1); + } + # Client wants to move a file + elsif ($command =~ /^MV <(.*)>$/) { + if ($t_insecure == 0) { + print_info ("Insecure mode disabled. Rejected request to move file $1 from " . $t_client_socket->sockhost ()); + last; + } + + print_info ("Request to move file '$1' from " . $t_client_socket->sockhost ()); + move_file ($1); + } + # Unknown command + else { + print_log ("Unknown command '$command' from " . $t_client_socket->sockhost ()); + last; + } + } +} + +################################################################################ +## SUB auth_pwd +## Authenticate client with server password. +################################################################################ +sub auth_pwd { + my $client_digest; + my $command; + my $pwd_digest; + + require Digest::MD5; + + # Wait for password + $command = recv_command ($t_block_size); + if ($command !~ /^PASS (.*)$/) { + error ("Client " . $t_client_socket->sockhost () . " did not authenticate."); + } + + $client_digest = $1; + $pwd_digest = Digest::MD5::md5 ($t_pwd); + $pwd_digest = Digest::MD5::md5_hex ($pwd_digest); + + if ($client_digest ne $pwd_digest) { + error ("Invalid password from " . $t_client_socket->sockhost () . "."); + } + + print_log ("Client " . $t_client_socket->sockhost () . " authenticated"); + send_data ("PASS OK\n"); +} + +################################################################################ +## SUB recv_file +## Receive a file of size $_[1] and save it in $t_directory as $_[0]. +################################################################################ +sub recv_file { + my $base_name = $_[0]; + my $data = ''; + my $file; + my $size = $_[1]; + + # Check file name + if ($base_name =~ /[$t_invalid_chars]/) { + print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " has an invalid file name"); + send_data ("SEND ERR (invalid file name)\n"); + return; + } + + # Check file size, empty files are not allowed + if ($size < 1 || $size > $t_max_size) { + print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " is too big"); + send_data ("SEND ERR (file is too big)\n"); + return; + } + + # Apply filters + $file = "$t_directory/" . apply_filters ($base_name) . $base_name; + + # Check if file exists + if (-f $file && $t_overwrite == 0) { + print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " already exists"); + send_data ("SEND ERR (file already exists)\n"); + return; + } + + send_data ("SEND OK\n"); + + # Receive file + $data = recv_data_block ($size); + + # Write it to disk + open (FILE, "> $file") || error ("Cannot open file '$file' for writing."); + binmode (FILE); + print (FILE $data); + close (FILE); + + send_data ("SEND OK\n"); + print_info ("Received file '$base_name' size ${size}b from " . $t_client_socket->sockhost ()); +} + +################################################################################ +## SUB zrecv_file +## Receive a compressed file of size $_[1] and save it in $t_directory as $_[0]. +################################################################################ +sub zrecv_file { + my $base_name = $_[0]; + my $data = ''; + my $file; + my $size = $_[1]; + my $zdata = ''; + + # Check file name + if ($base_name =~ /[$t_invalid_chars]/) { + print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " has an invalid file name"); + send_data ("ZSEND ERR (invalid file name)\n"); + return; + } + + # Check file size, empty files are not allowed + if ($size < 1 || $size > $t_max_size) { + print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " is too big"); + send_data ("ZSEND ERR (file is too big)\n"); + return; + } + + # Apply filters + $file = "$t_directory/" . apply_filters ($base_name) . $base_name; + + # Check if file exists + if (-f $file && $t_overwrite == 0) { + print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " already exists"); + send_data ("ZSEND ERR (file already exists)\n"); + return; + } + + send_data ("ZSEND OK\n"); + + # Receive file + $zdata = recv_data_block ($size); + if (!unzip(\$zdata => \$data)) { + print_log ("Uncompress error: $UnzipError"); + send_data ("ZSEND ERR\n"); + return; + } + + # Write it to disk + open (FILE, "> $file") || error ("Cannot open file '$file' for writing."); + binmode (FILE); + print (FILE $data); + close (FILE); + + send_data ("ZSEND OK\n"); + print_info ("Received compressed file '$base_name' size ${size}b from " . $t_client_socket->sockhost ()); +} + +################################################################################ +## SUB send_file +## Send a file to the client +################################################################################ +sub send_file { + my $base_name = $_[0]; + my $data = ''; + my $file; + my $response; + my $size; + + # Check file name + if ($base_name =~ /[$t_invalid_chars]/) { + print_log ("Requested file '$base_name' from " . $t_client_socket->sockhost () . " has an invalid file name"); + send_data ("RECV ERR (file has an invalid file name)\n"); + return; + } + + # Apply filters + $file = "$t_directory/" . apply_filters ($base_name) . $base_name; + + # Check if file exists + if (! -f $file) { + print_log ("Requested file '$file' from " . $t_client_socket->sockhost () . " does not exist"); + send_data ("RECV ERR (file does not exist)\n"); + return; + } + + $size = -s $file; + send_data ("RECV SIZE $size\n"); + + # Wait for client response + $response = recv_command ($t_block_size); + if ($response ne "RECV OK") { + print_log ("Requested file '$file' from " . $t_client_socket->sockhost () . " not sent"); + return; + } + + # Send the file + open (FILE, $file) || error ("Cannot open file '$file' for reading."); + binmode (FILE); + { + local $/ = undef; + $data = <FILE>; + } + + send_data ($data); + close (FILE); + + print_log ("Requested file '$file' from " . $t_client_socket->sockhost () . " sent"); +} + +################################################################################ +## SUB zsend_file +## Send a file to the client +################################################################################ +sub zsend_file { + my $base_name = $_[0]; + my $data = ''; + my $file; + my $response; + my $size; + + # Check file name + if ($base_name =~ /[$t_invalid_chars]/) { + print_log ("Requested compressed file '$base_name' from " . $t_client_socket->sockhost () . " has an invalid file name"); + send_data ("ZRECV ERR (file has an invalid file name)\n"); + return; + } + + # Apply filters + $file = "$t_directory/" . apply_filters ($base_name) . $base_name; + + # Check if file exists + if (! -f $file) { + print_log ("Requested compressed '$file' from " . $t_client_socket->sockhost () . " does not exist"); + send_data ("ZRECV ERR (file does not exist)\n"); + return; + } + + # Read the file and compress its contents + if (! zip($file => \$data)) { + send_data ("QUIT\n"); + error ("Compression error: $ZipError"); + return; + } + + $size = length($data); + send_data ("ZRECV SIZE $size\n"); + + # Wait for client response + $response = recv_command ($t_block_size); + if ($response ne "ZRECV OK") { + print_log ("Requested compressed '$file' from " . $t_client_socket->sockhost () . " not sent"); + return; + } + + # Send the file + send_data ($data); + + print_log ("Requested compressed '$file' from " . $t_client_socket->sockhost () . " sent"); +} + +################################################################################ +# Common functions +################################################################################ + +################################################################################ +## SUB print_log +## Print log messages. +################################################################################ +sub print_log($) { + + my ($msg) = @_; + + return unless ($t_log == 1); + + my $fh = *STDOUT; + if (defined($log_file)) { + open($fh, ">>", $log_file) || die("Starting log failed: $!.\n"); + } + + print ($fh strftime ("%Y-%m-%d %H:%M:%S", localtime()) . "[log]$msg.\n"); + + close ($fh) if (defined($log_file)); + +} + +################################################################################ +## SUB print_log +## Print log messages. +################################################################################ +sub print_info($) { + + my ($msg) = @_; + + return unless ($t_log_hard == 1); + + my $fh = *STDOUT; + if (defined($log_file)) { + open($fh, ">>", $log_file) || die("Starting log failed: $!.\n"); + } + + print ($fh strftime ("%Y-%m-%d %H:%M:%S", localtime()) . "[info]$msg.\n"); + + close ($fh) if (defined($log_file)); + +} + +################################################################################ +## SUB error +## Print an error and exit the program. +################################################################################ +sub error { + + my ($msg) = @_; + + return unless ($t_quiet == 0); + + my $fh = *STDERR; + if (defined($log_file)) { + open($fh, ">>", $log_file) || die("$!\n"); + } + + print ($fh strftime ("%Y-%m-%d %H:%M:%S", localtime()) . "[err]$msg\n"); + + close ($fh) if (defined($log_file)); + + die("\n"); +} + +################################################################################ +## SUB move_file +## Send a file to the client and delete it +################################################################################ +sub move_file { + my $base_name = $_[0]; + my $data = ''; + my $file; + my $response; + my $size; + + # Check file name + if ($base_name =~ /[$t_invalid_chars]/) { + print_log ("Requested file '$base_name' from " . $t_client_socket->sockhost () . " has an invalid file name"); + send_data ("MV ERR\n"); + return; + } + + # Apply filters + $file = "$t_directory/" . apply_filters ($base_name) . $base_name; + + # Check if file exists + if (! -f $file) { + print_log ("Requested file '$file' from " . $t_client_socket->sockhost () . " does not exist"); + send_data ("MV ERR\n"); + return; + } + + $size = -s $file; + send_data ("MV SIZE $size\n"); + + # Wait for client response + $response = recv_command ($t_block_size); + if ($response ne "MV OK") { + print_log ("Requested file '$file' from " . $t_client_socket->sockhost () . " not sent"); + return; + } + + # Send the file + open (FILE, $file) || error ("Cannot open file '$file' for reading."); + binmode (FILE); + + while ($data = <FILE>) { + send_data ($data); + } + + close (FILE); + unlink($file); + + print_log ("Requested file '$file' from " . $t_client_socket->sockhost () . " sent and deleted"); +} + +################################################################################ +## SUB send_file_list +## Send a list of files to the client after applying the given filter. +################################################################################ +sub send_file_list { + my $filter = $_[0]; + my $data = ''; + my $dir; + my $dh; + my $response; + my $size; + + # Check file name + if ($filter =~ /[$t_invalid_chars]/) { + print_log ("Invalid file listing filter '$filter' from " . $t_client_socket->sockhost ()); + send_data ("LS ERR\n"); + return; + } + + # Apply filters + $dir = "$t_directory/" . apply_filters ($filter); + + # Open the directory. + if (! opendir ($dh, $dir)) { + print_log ("Error opening directory $dir as requested from " . $t_client_socket->sockhost () . ": $!"); + send_data ("LS ERR\n"); + return; + } + + # List files. + while (my $file = readdir ($dh)) { + next if ($file =~ /[$t_invalid_chars]/); # Only list files valid for Tentacle. + $data .= "$file\n"; + } + closedir $dh; + + $size = length ($data); + send_data ("LS SIZE $size\n"); + + # Wait for client response + $response = recv_command ($t_block_size); + if ($response ne "LS OK") { + print_log ("Requested directory listing from " . $t_client_socket->sockhost () . " not sent"); + return; + } + + send_data ($data); + + print_log ("Requested directory listing from " . $t_client_socket->sockhost () . " sent"); +} + +################################################################################ +## SUB recv_data_proxy +## Recv data from proxy socket. +################################################################################ +sub recv_data_proxy { + my $data; + my $read; + my $retries = 0; + my $size = $_[0]; + + while (1) { + + # Try to read data from the socket + if ($t_proxy_select->can_read ($t_timeout)) { + + # Read at most $size bytes + $read = sysread ($t_proxy_socket, $data, $size); + + # Read error + if (! defined ($read)) { + error ("Read error from " . $t_proxy_socket->sockhost () . ": $!."); + } + + # EOF + if ($read == 0) { + error ("Connection from " . $t_proxy_socket->sockhost () . " unexpectedly closed."); + } + + return ($read, $data); + } + + # Retry + $retries++; + + # But check for error conditions first + if ($retries > $t_retries) { + error ("Connection from " . $t_proxy_socket->sockhost () . " timed out."); + } + } +} +################################################################################ +## SUB recv_data +## Read data from the client socket. Returns the number of bytes read and the +## string of bytes as a two element array. +################################################################################ +sub recv_data { + my $data; + my $read; + my $retries = 0; + my $size = $_[0]; + + while (1) { + + # Try to read data from the socket + if ($t_select->can_read ($t_timeout)) { + + # Read at most $size bytes + $read = sysread ($t_client_socket, $data, $size); + + # Read error + if (! defined ($read)) { + error ("Read error from " . $t_client_socket->sockhost () . ": $!."); + } + + # EOF + if ($read == 0) { + error ("Connection from " . $t_client_socket->sockhost () . " unexpectedly closed."); + } + + return ($read, $data); + } + + # Retry + $retries++; + + # But check for error conditions first + if ($retries > $t_retries) { + error ("Connection from " . $t_client_socket->sockhost () . " timed out."); + } + } +} + +################################################################################ +## SUB send_data +## Write data to the client socket. +################################################################################ +sub send_data { + my $data = $_[0]; + my $block_size; + my $retries = 0; + my $size; + my $total = 0; + my $written; + + $size = length ($data); + + while (1) { + + # Try to write data to the socket + if ($t_select->can_write ($t_timeout)) { + + $block_size = ($size - $total) > $t_block_size ? $t_block_size : ($size - $total); + $written = syswrite ($t_client_socket, $data, $block_size, $total); + + # Write error + if (! defined ($written)) { + error ("Connection error from " . $t_client_socket->sockhost () . ": $!."); + } + + # EOF + if ($written == 0) { + error ("Connection from " . $t_client_socket->sockhost () . " unexpectedly closed."); + } + + $total += $written; + + # Check if all data was written + if ($total == $size) { + return; + } + } + # Retry + else { + $retries++; + if ($retries > $t_retries) { + error ("Connection from " . $t_client_socket->sockhost () . " timed out."); + } + } + } +} + +################################################################################ +## SUB recv_command +## Read a command from the client, ended by a new line character. +################################################################################ +sub recv_command { + my $buffer; + my $char; + my $command = ''; + my $read; + my $total = 0; + + while (1) { + + ($read, $buffer) = recv_data ($t_block_size); + $command .= $buffer; + $total += $read; + + # Check if the command is complete + $char = chop ($command); + if ($char eq "\n") { + return $command; + } + + $command .= $char; + + # Avoid overflow + if ($total > $t_block_size) { + error ("Received too much data from " . $t_client_socket->sockhost () . "."); + } + } +} + +################################################################################ +## SUB recv_data_block +## Read $_[0] bytes of data from the client. +################################################################################ +sub recv_data_block { + my $buffer = ''; + my $data = ''; + my $read; + my $size = $_[0]; + my $total = 0; + + while (1) { + + ($read, $buffer) = recv_data ($size - $total); + $data .= $buffer; + $total += $read; + + # Check if all data has been read + if ($total == $size) { + return $data; + } + } +} + +################################################################################ +## SUB ask_passwd +## Asks the user for a password. +################################################################################ +sub ask_passwd { + my $msg1 = $_[0]; + my $msg2 = $_[1]; + my $pwd1; + my $pwd2; + + require Term::ReadKey; + + # Disable keyboard echo + Term::ReadKey::ReadMode('noecho'); + + # Promt for password + print ($msg1); + $pwd1 = Term::ReadKey::ReadLine(0); + print ("\n$msg2"); + $pwd2 = Term::ReadKey::ReadLine(0); + print ("\n"); + + # Restore original settings + Term::ReadKey::ReadMode('restore'); + + if ($pwd1 ne $pwd2) { + print ("Error: passwords do not match.\n"); + exit 1; + } + + # Remove the trailing new line character + chop $pwd1; + + return $pwd1; +} + +################################################################################ +## SUB apply_filters +## Applies filters to the given file. +################################################################################ +sub apply_filters ($) { + my ($file_name) = @_; + + foreach my $filter (@t_filters) { + my ($regexp, $dir) = @{$filter}; + if ($file_name =~ /$regexp/) { + print_log ("File '$file_name' matches filter '$regexp' (changing to directory '$dir')"); + return $dir . '/'; + } + } + + return ''; +} + +################################################################################ +## SUB install_service +## Install the Windows service. +################################################################################ +sub install_service() { + + my $service_path = $0; + my $service_params = $SERVICE_PARAMS; + + # Change the service parameter from 'install' to 'run'. + $service_params =~ s/\-S\s+\S+/\-S run/; + + my %service_hash = ( + machine => '', + name => 'TENTACLESRV', + display => $SERVICE_NAME, + path => $service_path, + user => '', + pwd => '', + description => 'Tentacle Server http://sourceforge.net/projects/tentacled/', + parameters => $service_params + ); + + if (Win32::Daemon::CreateService(\%service_hash)) { + print "Successfully added.\n"; + exit 0; + } else { + print "Failed to add service: " . Win32::FormatMessage(Win32::Daemon::GetLastError()) . "\n"; + exit 1; + } +} + +################################################################################ +## SUB uninstall_service +## Install the Windows service. +################################################################################ +sub uninstall_service() { + if (Win32::Daemon::DeleteService('', 'TENTACLESRV')) { + print "Successfully deleted.\n"; + exit 0; + } else { + print "Failed to delete service: " . Win32::FormatMessage(Win32::Daemon::GetLastError()) . "\n"; + exit 1; + } +} + +################################################################################ +## SUB callback_running +## Windows service callback function for the running event. +################################################################################ +sub callback_running { + + if (Win32::Daemon::State() == WIN32_SERVICE_RUNNING) { + } +} + +################################################################################ +## SUB callback_start +## Windows service callback function for the start event. +################################################################################ +sub callback_start { + + # Accept_connections (); + my $thr = threads->create(\&accept_connections); + if (!defined($thr)) { + Win32::Daemon::State(WIN32_SERVICE_STOPPED); + Win32::Daemon::StopService(); + return; + } + $thr->detach(); + + Win32::Daemon::State(WIN32_SERVICE_RUNNING); +} + +################################################################################ +## SUB callback_stop +## Windows service callback function for the stop event. +################################################################################ +sub callback_stop { + + foreach my $t_server_socket (@t_server_sockets) { + $t_server_socket->shutdown (2); + $t_server_socket->close (); + } + + Win32::Daemon::State(WIN32_SERVICE_STOPPED); + Win32::Daemon::StopService(); +} + + +################################################################################ +## SUB check_ssleay_version +## Print a message if the installed version of Net::SSLeay may leak memory. +################################################################################ +sub check_ssleay_version { + eval { + require Net::SSLeay; + return unless defined($Net::SSLeay::VERSION) && $Net::SSLeay::VERSION =~ m/^(\d+)\.(\d+)/ && $1 <= 1 && $2 < 88; + print_log ("Net::SSLeay version $Net::SSLeay::VERSION detected. Versions prior to 1.88 may leak memory. To upgrade it see: https://metacpan.org/pod/Net::SSLeay"); + }; +} + +################################################################################ +# Main +################################################################################ + +# Never run as root +if ($> == 0 && $^O ne 'MSWin32') { + print ("Error: for safety reasons $0 cannot be run with root privileges.\n"); + exit 1; +} + +# Parse command line options +parse_options (); + +# Check command line arguments +if ($#ARGV != -1) { + print_help (); + exit 1; +} + +check_ssleay_version() if $t_ssl == 1; + +# Show IPv6 status +if ($SOCKET_MODULE eq 'IO::Socket::INET') { + print_log ("IO::Socket::INET6 is not found. IPv6 is disabled."); +} + +# Run as daemon? +if ($t_daemon == 1 && $^O ne 'MSWin32') { + daemonize (); +} + +# Handle ctr-c +if ($^O eq 'MSWin32') { + no warnings; + $SIG{INT2} = \&stop_server; + use warnings; +} +else { + $SIG{INT} = \&stop_server; +} + +# Accept connections +accept_connections(); + +__END__ + +=head1 REQUIRED ARGUMENTES + +=over + +=item B<< -s F<storage_directory> >> Root directory to store the files received by the server + +=back + +=head1 OPTIONS + +=over + +=item I<-a ip_address> Address to B<listen> on (default I<0.0.0.0>). + +=item I<-c number> B<Maximum> number of simultaneous B<connections> (default I<10>). + +=item I<-d> Run as B<daemon>. + +=item I<-e cert> B<OpenSSL certificate> file. Enables SSL. + +=item I<-f ca_cert> Verify that the peer certificate is signed by a B<CA>. + +=item I<-h> Show B<help>. + +=item I<-i> B<Filters>. + +=item I<-k key> B<OpenSSL private key> file. + +=item I<-m size> B<Maximum file size> in bytes (default I<2000000b>). + +=item I<-o> Enable file B<overwrite>. + +=item I<-p port> B<Port to listen> on (default I<41121>). + +=item I<-q> B<Quiet>. Do now print error messages. + +=item I<-r number> B<Number of retries> for network opertions (default I<3>). + +=item I<-t time> B<Time-out> for network operations in B<seconds> (default I<1s>). + +=item I<-v> Be B<verbose>. + +=item I<-w> Prompt for B<OpenSSL private key password>. + +=item I<-x> pwd B<Server password>. + +=back + +=head1 EXIT STATUS + +=over + +=item 0 on Success + +=item 1 on Error + +=back + +=head1 CONFIGURATION + +Tentacle doesn't use any configurationf files, all the configuration is done by the options passed when it's started. + +=head1 DEPENDENCIES + +L<Getopt::Std>, L<IO::Select>, L<IO::Socket::INET>, L<Thread::Semaphore>, L<POSIX> + + +=head1 LICENSE + +This is released under the GNU Lesser General Public License. + +=head1 SEE ALSO + +L<Getopt::Std>, L<IO::Select>, L<IO::Socket::INET>, L<Thread::Semaphore>, L<POSIX> + +Protocol description and more info at: L<< https://pandorafms.com/docs/index.php?title=Pandora:Documentation_en:Tentacle >> + +=head1 COPYRIGHT + +Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L + +=cut + From edb0ebd5080442e118554d24148dac1a60e7f890 Mon Sep 17 00:00:00 2001 From: fbsanchez <fborja.sanchez@artica.es> Date: Tue, 10 Nov 2020 19:31:14 +0100 Subject: [PATCH 086/104] minor changes --- pandora_server/pandora_server_installer | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index dbd631dc57..973cf3f121 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -262,6 +262,7 @@ install () { ln -s /usr/local/bin/pandora_server $DESTDIR$PREFIX/bin ln -s /usr/local/bin/pandora_exec $DESTDIR$PREFIX/bin ln -s /usr/local/bin/tentacle_server $DESTDIR$PREFIX/bin + ln -s /usr/local/bin/tentacle_client $DESTDIR$PREFIX/bin fi fi fi @@ -495,7 +496,9 @@ uninstall () { rm -f $DESTDIR$PANDORA_SERVER 2> /dev/null rm -f $DESTDIR$PREFIX/bin/pandora_server 2> /dev/null rm -f $DESTDIR$PREFIX/bin/pandora_exec 2> /dev/null - rm -f $DESTDIR$PREFIX/bin/tentacle_server 2> /dev/null + # Do not remove tentacle files if agent is still installed... + [ -e $DESTDIR$PREFIX/bin/pandora_agent ] || rm -f $DESTDIR$PREFIX/bin/tentacle_server 2> /dev/null + [ -e $DESTDIR$PREFIX/bin/pandora_agent ] || rm -f $DESTDIR$PREFIX/bin/tentacle_client 2> /dev/null rm -Rf $DESTDIR$PANDORA_HOME rm -f $DESTDIR/etc/cron.hourly/pandora_db rm -f $DESTDIR/etc/logrotate.d/pandora_server From 33fbdd1819d8c19f33f946a26cd2e34a5d11761c Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Wed, 11 Nov 2020 01:00:32 +0100 Subject: [PATCH 087/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 9d8383f3cd..d45b4bafb5 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201110 +Version: 7.0NG.750-201111 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 895c172aff..0fa21bd5a0 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201110" +pandora_version="7.0NG.750-201111" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 248e478e90..f15435c581 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201110'; +use constant AGENT_BUILD => '201111'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 775e0b8d03..d3d3cfc4c8 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201110 +%define release 201111 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index f5216f943e..d8e990c2a6 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201110 +%define release 201111 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 2c888df984..782c61cce4 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201110" +PI_BUILD="201111" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 73e5275392..02ce38fb77 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201110} +{201111} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 694a757fa1..cfdae5a3a3 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201110)") +#define PANDORA_VERSION ("7.0NG.750(Build 201111)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index dd07c7e05e..b327a39ac2 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201110))" + VALUE "ProductVersion", "(7.0NG.750(Build 201111))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index cb163f7a71..b2eb6352d5 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201110 +Version: 7.0NG.750-201111 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index e91af80084..1f4736fe3d 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201110" +pandora_version="7.0NG.750-201111" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 8081929e5f..7ff6335385 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201110'; +$build_version = 'PC201111'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 06268b68a7..5938e2f1bc 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201110'; + $build = '201111'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index ed517c0500..278e32346b 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201110 +%define release 201111 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index c784d10b0b..6c9d6d2c23 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201110 +%define release 201111 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 77fda01772..2de2d46d34 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201110 +%define release 201111 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index d03a593531..c9d37462bf 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201110 +Version: 7.0NG.750-201111 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index a9ffa068ab..49c01de846 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201110" +pandora_version="7.0NG.750-201111" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 677e8c1149..17cbdb722e 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201110"; +my $pandora_build = "201111"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index da308bf854..dda3ec8d2e 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201110"; +my $pandora_build = "201111"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index a85eb9033a..de60dbcdab 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201110 +%define release 201111 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 4256526172..08f8aa5ed9 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201110 +%define release 201111 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index dbd631dc57..c95cb92ab2 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201110" +PI_BUILD="201111" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index d0f9298278..250829ecbd 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201110"; +my $version = "7.0NG.750 PS201111"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index e043a0a4b3..3fb25264fd 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201110"; +my $version = "7.0NG.750 PS201111"; # save program name for logging my $progname = basename($0); From 834b102ad2a405e89d2ee0155d12d0c2e46826cc Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Thu, 12 Nov 2020 01:00:32 +0100 Subject: [PATCH 088/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index d45b4bafb5..b2e9a3be90 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201111 +Version: 7.0NG.750-201112 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 0fa21bd5a0..dda4461ab0 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201111" +pandora_version="7.0NG.750-201112" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index f15435c581..5fade62bba 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201111'; +use constant AGENT_BUILD => '201112'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index d3d3cfc4c8..2cd67ee579 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201111 +%define release 201112 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index d8e990c2a6..1fc7ff3f06 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201111 +%define release 201112 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 782c61cce4..e2d0595a52 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201111" +PI_BUILD="201112" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 02ce38fb77..8b61d57cc0 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201111} +{201112} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index cfdae5a3a3..e0ae457e3b 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201111)") +#define PANDORA_VERSION ("7.0NG.750(Build 201112)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index b327a39ac2..1c3b3d4c29 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201111))" + VALUE "ProductVersion", "(7.0NG.750(Build 201112))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index b2eb6352d5..35796ce95a 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201111 +Version: 7.0NG.750-201112 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 1f4736fe3d..35e2211f6c 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201111" +pandora_version="7.0NG.750-201112" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 7ff6335385..4417e157a5 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201111'; +$build_version = 'PC201112'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 5938e2f1bc..668b70b74c 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201111'; + $build = '201112'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 278e32346b..c41f2ab4b1 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201111 +%define release 201112 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 6c9d6d2c23..3f00db0a67 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201111 +%define release 201112 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 2de2d46d34..9b5ea38cdd 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201111 +%define release 201112 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index c9d37462bf..f04f29f843 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201111 +Version: 7.0NG.750-201112 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 49c01de846..2911a0f9c2 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201111" +pandora_version="7.0NG.750-201112" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 17cbdb722e..74bb53e76f 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201111"; +my $pandora_build = "201112"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index dda3ec8d2e..9bc3d9c4c5 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201111"; +my $pandora_build = "201112"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index de60dbcdab..55bd553b9a 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201111 +%define release 201112 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 08f8aa5ed9..afb1e8290d 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201111 +%define release 201112 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index c95cb92ab2..356cafbfd2 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201111" +PI_BUILD="201112" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 250829ecbd..67a9718866 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201111"; +my $version = "7.0NG.750 PS201112"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 3fb25264fd..bd64108725 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201111"; +my $version = "7.0NG.750 PS201112"; # save program name for logging my $progname = basename($0); From 023c72b44b20f2d96f60eb17f731295a61ae269d Mon Sep 17 00:00:00 2001 From: rafael <rafael.ameijeiras@artica.es> Date: Thu, 12 Nov 2020 15:42:43 +0100 Subject: [PATCH 089/104] change compose to use latest --- extras/docker/centos8/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/docker/centos8/docker-compose.yml b/extras/docker/centos8/docker-compose.yml index f33b6fe9ed..5ac5385133 100644 --- a/extras/docker/centos8/docker-compose.yml +++ b/extras/docker/centos8/docker-compose.yml @@ -17,7 +17,7 @@ services: - pandora pandora: - image: pandorafms/pandorafms-open-stack-el8:749 + image: pandorafms/pandorafms-open-stack-el8:latest restart: always depends_on: - db From 6fcc1107ec0221f0670dd164053f999a6eb7ce4a Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Fri, 13 Nov 2020 01:00:33 +0100 Subject: [PATCH 090/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index b2e9a3be90..11af93db7a 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201112 +Version: 7.0NG.750-201113 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index dda4461ab0..44e2ba2f16 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201112" +pandora_version="7.0NG.750-201113" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 5fade62bba..6b1ad5db29 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201112'; +use constant AGENT_BUILD => '201113'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 2cd67ee579..841a7d88a5 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201112 +%define release 201113 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 1fc7ff3f06..68d99d4b99 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201112 +%define release 201113 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index e2d0595a52..7086c680d2 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201112" +PI_BUILD="201113" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 8b61d57cc0..573a61183b 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201112} +{201113} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e0ae457e3b..b0fbe22041 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201112)") +#define PANDORA_VERSION ("7.0NG.750(Build 201113)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 1c3b3d4c29..f701ac13b0 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201112))" + VALUE "ProductVersion", "(7.0NG.750(Build 201113))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 35796ce95a..d553f1c1c0 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201112 +Version: 7.0NG.750-201113 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 35e2211f6c..1964be545a 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201112" +pandora_version="7.0NG.750-201113" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4417e157a5..b54255fd23 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201112'; +$build_version = 'PC201113'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 668b70b74c..061c98a038 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201112'; + $build = '201113'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index c41f2ab4b1..8e8d59763c 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201112 +%define release 201113 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 3f00db0a67..012e43c0bd 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201112 +%define release 201113 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 9b5ea38cdd..980f7193be 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201112 +%define release 201113 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index f04f29f843..adefbb861a 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201112 +Version: 7.0NG.750-201113 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 2911a0f9c2..7af02ed8c6 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201112" +pandora_version="7.0NG.750-201113" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 74bb53e76f..45aaffcc88 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201112"; +my $pandora_build = "201113"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 9bc3d9c4c5..89c0ecd1ba 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201112"; +my $pandora_build = "201113"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 55bd553b9a..660259f4a8 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201112 +%define release 201113 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index afb1e8290d..40575b6ead 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201112 +%define release 201113 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 356cafbfd2..b22c22dbb3 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201112" +PI_BUILD="201113" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 67a9718866..a76bb23d2b 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201112"; +my $version = "7.0NG.750 PS201113"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index bd64108725..7a34f7112d 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201112"; +my $version = "7.0NG.750 PS201113"; # save program name for logging my $progname = basename($0); From 26ab48073b0d1f7b24dbb998b27115d8ccdcb24c Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Sat, 14 Nov 2020 01:00:30 +0100 Subject: [PATCH 091/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 11af93db7a..77927230cc 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201113 +Version: 7.0NG.750-201114 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 44e2ba2f16..6596e22263 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201113" +pandora_version="7.0NG.750-201114" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 6b1ad5db29..685dbe9ac6 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201113'; +use constant AGENT_BUILD => '201114'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 841a7d88a5..b8696f339b 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201113 +%define release 201114 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 68d99d4b99..4b778a1d0e 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201113 +%define release 201114 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 7086c680d2..bb8af40557 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201113" +PI_BUILD="201114" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 573a61183b..f166853a8f 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201113} +{201114} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index b0fbe22041..8b00ba52aa 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201113)") +#define PANDORA_VERSION ("7.0NG.750(Build 201114)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f701ac13b0..996992df06 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201113))" + VALUE "ProductVersion", "(7.0NG.750(Build 201114))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index d553f1c1c0..baafcc681a 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201113 +Version: 7.0NG.750-201114 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 1964be545a..e2b7fc5c21 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201113" +pandora_version="7.0NG.750-201114" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index b54255fd23..740769e181 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201113'; +$build_version = 'PC201114'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 061c98a038..dc4e2e2183 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201113'; + $build = '201114'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 8e8d59763c..cc6641637c 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201113 +%define release 201114 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 012e43c0bd..cdf040f211 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201113 +%define release 201114 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 980f7193be..eac9b1c9ed 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201113 +%define release 201114 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index adefbb861a..68c2108172 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201113 +Version: 7.0NG.750-201114 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 7af02ed8c6..59c1d3b064 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201113" +pandora_version="7.0NG.750-201114" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 45aaffcc88..107254cefb 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201113"; +my $pandora_build = "201114"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 89c0ecd1ba..060f164fdb 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201113"; +my $pandora_build = "201114"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 660259f4a8..60fe49f9dc 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201113 +%define release 201114 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 40575b6ead..66dd616155 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201113 +%define release 201114 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index b22c22dbb3..678e7eeb1c 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201113" +PI_BUILD="201114" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index a76bb23d2b..5b20db345c 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201113"; +my $version = "7.0NG.750 PS201114"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 7a34f7112d..117acd233e 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201113"; +my $version = "7.0NG.750 PS201114"; # save program name for logging my $progname = basename($0); From efa96ab9477542a06b37f1e273df5f2f7641c891 Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Sun, 15 Nov 2020 01:00:31 +0100 Subject: [PATCH 092/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 77927230cc..d0f3dcd2df 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201114 +Version: 7.0NG.750-201115 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 6596e22263..c269449cc2 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201114" +pandora_version="7.0NG.750-201115" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 685dbe9ac6..64a252655c 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201114'; +use constant AGENT_BUILD => '201115'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index b8696f339b..89869980cc 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201114 +%define release 201115 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 4b778a1d0e..ea370a6e40 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201114 +%define release 201115 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index bb8af40557..39f7961ae6 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201114" +PI_BUILD="201115" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f166853a8f..f4f3d7bcc5 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201114} +{201115} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 8b00ba52aa..651ad47e8c 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201114)") +#define PANDORA_VERSION ("7.0NG.750(Build 201115)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 996992df06..403e7a8e0a 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201114))" + VALUE "ProductVersion", "(7.0NG.750(Build 201115))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index baafcc681a..ab25862c7c 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201114 +Version: 7.0NG.750-201115 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index e2b7fc5c21..a6306391f5 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201114" +pandora_version="7.0NG.750-201115" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 740769e181..978f097e4c 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201114'; +$build_version = 'PC201115'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index dc4e2e2183..73e4739bb6 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201114'; + $build = '201115'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index cc6641637c..0067e41df4 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201114 +%define release 201115 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index cdf040f211..1faa45bec8 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201114 +%define release 201115 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index eac9b1c9ed..583a55a479 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201114 +%define release 201115 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 68c2108172..b52204ba46 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201114 +Version: 7.0NG.750-201115 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 59c1d3b064..0ed483f6f6 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201114" +pandora_version="7.0NG.750-201115" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 107254cefb..d7e2070be8 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201114"; +my $pandora_build = "201115"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 060f164fdb..40e95be10d 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201114"; +my $pandora_build = "201115"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 60fe49f9dc..bf5cb70a53 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201114 +%define release 201115 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 66dd616155..28ea5515f9 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201114 +%define release 201115 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 678e7eeb1c..cf20d3fafb 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201114" +PI_BUILD="201115" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 5b20db345c..5e6c066c2c 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201114"; +my $version = "7.0NG.750 PS201115"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 117acd233e..4faeca32b4 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201114"; +my $version = "7.0NG.750 PS201115"; # save program name for logging my $progname = basename($0); From 810db1eec449e55358038ed0a2bee8eee015ef5e Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Mon, 16 Nov 2020 01:00:30 +0100 Subject: [PATCH 093/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index d0f3dcd2df..abe975fa4b 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201115 +Version: 7.0NG.750-201116 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index c269449cc2..df9a496ca0 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201115" +pandora_version="7.0NG.750-201116" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 64a252655c..fefe27defc 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201115'; +use constant AGENT_BUILD => '201116'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 89869980cc..791d58aa08 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201115 +%define release 201116 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index ea370a6e40..1efdfb74ca 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201115 +%define release 201116 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 39f7961ae6..309724cd5d 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201115" +PI_BUILD="201116" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f4f3d7bcc5..118ca3e011 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201115} +{201116} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 651ad47e8c..05ad54b828 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201115)") +#define PANDORA_VERSION ("7.0NG.750(Build 201116)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 403e7a8e0a..512b2e5d30 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201115))" + VALUE "ProductVersion", "(7.0NG.750(Build 201116))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index ab25862c7c..29b793cb75 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201115 +Version: 7.0NG.750-201116 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index a6306391f5..2cea2ac429 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201115" +pandora_version="7.0NG.750-201116" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 978f097e4c..28111b9785 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201115'; +$build_version = 'PC201116'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 73e4739bb6..1e31dde741 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201115'; + $build = '201116'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 0067e41df4..2fef11afa6 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201115 +%define release 201116 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 1faa45bec8..e73445fcb6 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201115 +%define release 201116 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 583a55a479..a1079df2de 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201115 +%define release 201116 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index b52204ba46..3ddc0ad265 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201115 +Version: 7.0NG.750-201116 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 0ed483f6f6..50056e6125 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201115" +pandora_version="7.0NG.750-201116" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index d7e2070be8..3681575629 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201115"; +my $pandora_build = "201116"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 40e95be10d..cea91e2e55 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201115"; +my $pandora_build = "201116"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index bf5cb70a53..d399b2df1f 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201115 +%define release 201116 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 28ea5515f9..82aa51a63f 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201115 +%define release 201116 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index cf20d3fafb..8c3b442014 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201115" +PI_BUILD="201116" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 5e6c066c2c..48104968ac 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201115"; +my $version = "7.0NG.750 PS201116"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 4faeca32b4..bd0c7035cb 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201115"; +my $version = "7.0NG.750 PS201116"; # save program name for logging my $progname = basename($0); From 9bfdfa87f6e49faac531e48677452bdbfe0b4655 Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Tue, 17 Nov 2020 01:00:35 +0100 Subject: [PATCH 094/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index abe975fa4b..c04532b201 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201116 +Version: 7.0NG.750-201117 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index df9a496ca0..062fd2b5ab 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201116" +pandora_version="7.0NG.750-201117" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index fefe27defc..b95ec56038 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201116'; +use constant AGENT_BUILD => '201117'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 791d58aa08..9adeec5ba6 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201116 +%define release 201117 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 1efdfb74ca..9377d1c075 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201116 +%define release 201117 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 309724cd5d..87e6074406 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201116" +PI_BUILD="201117" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 118ca3e011..71a39cd889 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201116} +{201117} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 05ad54b828..a214e86e92 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201116)") +#define PANDORA_VERSION ("7.0NG.750(Build 201117)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 512b2e5d30..d8e3d7c0f3 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201116))" + VALUE "ProductVersion", "(7.0NG.750(Build 201117))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 29b793cb75..4790280bb5 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201116 +Version: 7.0NG.750-201117 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 2cea2ac429..b65682bfe7 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201116" +pandora_version="7.0NG.750-201117" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 28111b9785..e7efbbb0a0 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201116'; +$build_version = 'PC201117'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1e31dde741..d54728a983 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201116'; + $build = '201117'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 2fef11afa6..2e6184bc7c 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201116 +%define release 201117 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index e73445fcb6..dee5e76d90 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201116 +%define release 201117 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index a1079df2de..80dc3742f3 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201116 +%define release 201117 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 3ddc0ad265..bf0b43551f 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201116 +Version: 7.0NG.750-201117 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 50056e6125..8f94e1f56a 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201116" +pandora_version="7.0NG.750-201117" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 3681575629..a160368eec 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201116"; +my $pandora_build = "201117"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index cea91e2e55..4968f9ca88 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201116"; +my $pandora_build = "201117"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index d399b2df1f..e9bebe9e88 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201116 +%define release 201117 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 82aa51a63f..a8e32d58b6 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201116 +%define release 201117 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 4ed4bfc774..e57ae135b4 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201116" +PI_BUILD="201117" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 48104968ac..dece40fdca 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201116"; +my $version = "7.0NG.750 PS201117"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index bd0c7035cb..8015aa4681 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201116"; +my $version = "7.0NG.750 PS201117"; # save program name for logging my $progname = basename($0); From ce814ba5800b68bb8681e36eb88d1ed76f424720 Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Wed, 18 Nov 2020 01:00:20 +0100 Subject: [PATCH 095/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index c04532b201..1a85f7efbc 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201117 +Version: 7.0NG.750-201118 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 062fd2b5ab..6320af2c6a 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201117" +pandora_version="7.0NG.750-201118" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index b95ec56038..393197ca79 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201117'; +use constant AGENT_BUILD => '201118'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 9adeec5ba6..8ddc1e1ba8 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201117 +%define release 201118 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 9377d1c075..602a8f2821 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201117 +%define release 201118 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 87e6074406..b1fc6d41e3 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201117" +PI_BUILD="201118" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 71a39cd889..921590b09a 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201117} +{201118} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index a214e86e92..58edb326e2 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201117)") +#define PANDORA_VERSION ("7.0NG.750(Build 201118)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index d8e3d7c0f3..189d0d58c9 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201117))" + VALUE "ProductVersion", "(7.0NG.750(Build 201118))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4790280bb5..4fb8d8f508 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201117 +Version: 7.0NG.750-201118 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index b65682bfe7..aacbc3f530 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201117" +pandora_version="7.0NG.750-201118" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e7efbbb0a0..ce9bd24b06 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201117'; +$build_version = 'PC201118'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d54728a983..686a40172c 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201117'; + $build = '201118'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 2e6184bc7c..caf4ecb3f9 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201117 +%define release 201118 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index dee5e76d90..31457dbe40 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201117 +%define release 201118 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 80dc3742f3..df4f54cf6e 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201117 +%define release 201118 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index bf0b43551f..d8e3ae5590 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201117 +Version: 7.0NG.750-201118 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 8f94e1f56a..ef868de0bf 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201117" +pandora_version="7.0NG.750-201118" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index a160368eec..533ee203b2 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201117"; +my $pandora_build = "201118"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 4968f9ca88..38e0a62a2d 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201117"; +my $pandora_build = "201118"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index e9bebe9e88..4badf2fa3b 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201117 +%define release 201118 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index a8e32d58b6..33a601adef 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201117 +%define release 201118 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index e57ae135b4..2f2965202c 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201117" +PI_BUILD="201118" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index dece40fdca..af69a76ec9 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201117"; +my $version = "7.0NG.750 PS201118"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 8015aa4681..7cbad9e4e8 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201117"; +my $version = "7.0NG.750 PS201118"; # save program name for logging my $progname = basename($0); From b7d41449040ccba4abd476b70ffded87cbd8a289 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin <daniel.barbero@artica.es> Date: Wed, 18 Nov 2020 17:37:33 +0100 Subject: [PATCH 096/104] fix remove debug --- pandora_console/godmode/reporting/reporting_builder.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index a46ee1811e..724be2b1d5 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -2352,8 +2352,6 @@ switch ($action) { break; } - hd($values['server_name']); - hd(2); if ($values['server_name'] == '') { $values['server_name'] = get_parameter( 'combo_server' From e9259da802ff96e3096af955b809fa285e417765 Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Thu, 19 Nov 2020 01:00:19 +0100 Subject: [PATCH 097/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 1a85f7efbc..b348ba8c54 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201118 +Version: 7.0NG.750-201119 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 6320af2c6a..61ef057209 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201118" +pandora_version="7.0NG.750-201119" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 393197ca79..da14f0de2a 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201118'; +use constant AGENT_BUILD => '201119'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 8ddc1e1ba8..f1c3580cc6 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201118 +%define release 201119 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 602a8f2821..7f3eeae808 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201118 +%define release 201119 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index b1fc6d41e3..6795a302b3 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201118" +PI_BUILD="201119" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 921590b09a..a193b6f184 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201118} +{201119} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 58edb326e2..4693d320d0 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201118)") +#define PANDORA_VERSION ("7.0NG.750(Build 201119)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 189d0d58c9..c3250603d2 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201118))" + VALUE "ProductVersion", "(7.0NG.750(Build 201119))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4fb8d8f508..214a52d22a 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201118 +Version: 7.0NG.750-201119 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index aacbc3f530..06e978593c 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201118" +pandora_version="7.0NG.750-201119" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index ce9bd24b06..843929971b 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201118'; +$build_version = 'PC201119'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 686a40172c..04219b4be9 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201118'; + $build = '201119'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index caf4ecb3f9..5b07cbb27e 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201118 +%define release 201119 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 31457dbe40..d0c2464b85 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201118 +%define release 201119 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index df4f54cf6e..cef62bad30 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201118 +%define release 201119 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index d8e3ae5590..776d30d522 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201118 +Version: 7.0NG.750-201119 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index ef868de0bf..40a2e9c607 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201118" +pandora_version="7.0NG.750-201119" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 533ee203b2..8043ca83c6 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201118"; +my $pandora_build = "201119"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 38e0a62a2d..fe8c5b9b7d 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201118"; +my $pandora_build = "201119"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 4badf2fa3b..147d5a0e13 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201118 +%define release 201119 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 33a601adef..4b312b2874 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201118 +%define release 201119 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 2f2965202c..d0a2b8fc8a 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201118" +PI_BUILD="201119" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index af69a76ec9..0c4ef32049 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201118"; +my $version = "7.0NG.750 PS201119"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 7cbad9e4e8..9419b93f99 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201118"; +my $version = "7.0NG.750 PS201119"; # save program name for logging my $progname = basename($0); From 8706ec060ce766d5ac1dfe6989aae7e56613e344 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez <jose.gonzalez@artica.es> Date: Thu, 19 Nov 2020 13:31:32 +0100 Subject: [PATCH 098/104] Solve OIDs issues and malfunction of some modules --- pandora_console/include/class/AgentWizard.class.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/class/AgentWizard.class.php b/pandora_console/include/class/AgentWizard.class.php index a464d1af11..aa5acda1ad 100644 --- a/pandora_console/include/class/AgentWizard.class.php +++ b/pandora_console/include/class/AgentWizard.class.php @@ -1,5 +1,4 @@ <?php - /** * Agent Wizard for SNMP and WMI * @@ -1468,10 +1467,16 @@ class AgentWizard extends HTML $result[$value]['name'] = $data['module-default_name-'.$key]; } else if (empty(preg_match('/module-description-set/', $k)) === false) { $result[$value]['description'] = $data['module-default_description-'.$key]; + } else if (empty(preg_match('/module-value/', $k)) === false) { + $result[$value]['value'] = $data['module-value-'.$key]; } - preg_match('/^(.*)-.*?_(\d-\d)$/', $k, $matches); + preg_match('/^(.*)-.*?_(\d+-\d+)$/', $k, $matches); $k = $matches[1].'-0_'.$matches[2]; + } else { + if (empty(preg_match('/module-value/', $k)) === false) { + $result[$value]['value'] = $data[$k]; + } } } @@ -1495,7 +1500,7 @@ class AgentWizard extends HTML $result[$value]['scan_type'] = (int) $data[$k]; } else if (empty(preg_match('/module-execution_type/', $k)) === false) { $result[$value]['execution_type'] = (int) $data[$k]; - } else if (empty(preg_match('/module-value/', $k)) === false) { + } else if (($data['wizard_section'] !== 'snmp_interfaces_explorer') && (empty(preg_match('/module-value/', $k)) === false)) { $result[$value]['value'] = $data[$k]; } else if (empty(preg_match('/module-macros/', $k)) === false) { $result[$value]['macros'] = $data[$k]; From 64ed945a90580dda0ad82361d20f123c06e26270 Mon Sep 17 00:00:00 2001 From: Luis Calvo <luis.calvo@artica.es> Date: Thu, 19 Nov 2020 14:23:12 +0100 Subject: [PATCH 099/104] Fxed update manager offline missing include --- .../godmode/update_manager/update_manager.offline.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_console/godmode/update_manager/update_manager.offline.php b/pandora_console/godmode/update_manager/update_manager.offline.php index 37e9eed8e8..2461ec6980 100644 --- a/pandora_console/godmode/update_manager/update_manager.offline.php +++ b/pandora_console/godmode/update_manager/update_manager.offline.php @@ -44,6 +44,9 @@ if (! check_acl($config['id_user'], 0, 'PM') return; } +require_once $config['homedir'].'/include/functions_update_manager.php'; + + if (update_manager_verify_license_expired()) { ui_print_error_message( __('The license has expired. Please contact Artica at info@artica.es') From 7d0c31885c4a204b84dfa13b1c08371e1b84a795 Mon Sep 17 00:00:00 2001 From: daniel <daniel.barbero@artica.es> Date: Thu, 19 Nov 2020 14:53:44 +0100 Subject: [PATCH 100/104] fixed errors visual pie charts --- .../godmode/events/event_edit_filter.php | 3 ++- .../include/graphs/flot/pandora.flot.js | 15 --------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/pandora_console/godmode/events/event_edit_filter.php b/pandora_console/godmode/events/event_edit_filter.php index 5783797112..a93f38bfa1 100644 --- a/pandora_console/godmode/events/event_edit_filter.php +++ b/pandora_console/godmode/events/event_edit_filter.php @@ -138,7 +138,8 @@ if ($update || $create) { ['id_agente_modulo' => $id_agent_module] ) ); - } + } + $pagination = get_parameter('pagination', ''); $event_view_hr = get_parameter('event_view_hr', ''); $id_user_ack = get_parameter('id_user_ack', ''); diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 87ecf4b33f..a35b5dd71b 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -230,21 +230,6 @@ function pandoraFlotPieCustom( ); } var legends = $("#" + graph_id + " .legendLabel"); - var j = 0; - legends.each(function() { - //$(this).css("width", $(this).width()); - $(this).css("font-size", font_size + "pt"); - $(this).removeClass("legendLabel"); - $(this).addClass(font); - $(this).text(legend[j]); - j++; - }); - - if ($('input[name="custom_graph"]').val()) { - $(".legend>div").css("right", $(".legend>div").height() * -1); - $(".legend>table").css("right", $(".legend>div").height() * -1); - } - //$('.legend>table').css('border',"1px solid #E2E2E2"); if (background_color == "transparent") { $(".legend>table").css("background-color", ""); From f4c5d2ef6d3b090529540328337908956652f60f Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Fri, 20 Nov 2020 01:00:18 +0100 Subject: [PATCH 101/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index b348ba8c54..c8e9bd1b79 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201119 +Version: 7.0NG.750-201120 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 61ef057209..4a39969713 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201119" +pandora_version="7.0NG.750-201120" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index da14f0de2a..539e3c7ab0 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201119'; +use constant AGENT_BUILD => '201120'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index f1c3580cc6..46981d1d4a 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201119 +%define release 201120 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 7f3eeae808..88127566a8 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201119 +%define release 201120 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 6795a302b3..20ebd8fa95 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201119" +PI_BUILD="201120" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index a193b6f184..90b2ddfd0e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201119} +{201120} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 4693d320d0..a79dee7f78 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201119)") +#define PANDORA_VERSION ("7.0NG.750(Build 201120)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index c3250603d2..506963b44f 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201119))" + VALUE "ProductVersion", "(7.0NG.750(Build 201120))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 214a52d22a..d8f6b2455b 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201119 +Version: 7.0NG.750-201120 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 06e978593c..f48f8d1255 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201119" +pandora_version="7.0NG.750-201120" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 843929971b..300da0880f 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201119'; +$build_version = 'PC201120'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 04219b4be9..c714889897 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201119'; + $build = '201120'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 5b07cbb27e..f37c787f4a 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201119 +%define release 201120 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index d0c2464b85..11970045e9 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201119 +%define release 201120 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index cef62bad30..e8315678a1 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201119 +%define release 201120 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 776d30d522..fb41d3b92e 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201119 +Version: 7.0NG.750-201120 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 40a2e9c607..9fe1dc757d 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201119" +pandora_version="7.0NG.750-201120" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 8043ca83c6..3d0bc6760a 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201119"; +my $pandora_build = "201120"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index fe8c5b9b7d..f808213259 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201119"; +my $pandora_build = "201120"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 147d5a0e13..b28a8fef1e 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201119 +%define release 201120 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 4b312b2874..e4422fe194 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201119 +%define release 201120 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index d0a2b8fc8a..4df16f6a71 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201119" +PI_BUILD="201120" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 0c4ef32049..389bbe2616 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201119"; +my $version = "7.0NG.750 PS201120"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 9419b93f99..cf3a6cffdb 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201119"; +my $version = "7.0NG.750 PS201120"; # save program name for logging my $progname = basename($0); From 87640001dd2892384f5b967ee2e124f174e5cc85 Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Sat, 21 Nov 2020 01:00:20 +0100 Subject: [PATCH 102/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index c8e9bd1b79..f5fa214929 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201120 +Version: 7.0NG.750-201121 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 4a39969713..675e6a37f0 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201120" +pandora_version="7.0NG.750-201121" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 539e3c7ab0..82e85c1580 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201120'; +use constant AGENT_BUILD => '201121'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 46981d1d4a..67e6c5887c 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201120 +%define release 201121 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 88127566a8..d14e9ac588 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201120 +%define release 201121 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 20ebd8fa95..0a0a137475 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201120" +PI_BUILD="201121" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 90b2ddfd0e..140a5bfb4b 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201120} +{201121} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index a79dee7f78..6e75c9138e 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201120)") +#define PANDORA_VERSION ("7.0NG.750(Build 201121)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 506963b44f..545c00acc3 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201120))" + VALUE "ProductVersion", "(7.0NG.750(Build 201121))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index d8f6b2455b..c1e9ad510a 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201120 +Version: 7.0NG.750-201121 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index f48f8d1255..d7f6c1da0d 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201120" +pandora_version="7.0NG.750-201121" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 300da0880f..e1bdaf3cc5 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201120'; +$build_version = 'PC201121'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index c714889897..82ee459209 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201120'; + $build = '201121'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index f37c787f4a..715e6a94fe 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201120 +%define release 201121 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 11970045e9..2d09f3b6fb 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201120 +%define release 201121 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index e8315678a1..d70f053ab1 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201120 +%define release 201121 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index fb41d3b92e..711c2cd964 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201120 +Version: 7.0NG.750-201121 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 9fe1dc757d..952df312c4 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201120" +pandora_version="7.0NG.750-201121" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 3d0bc6760a..3c46f4cd71 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201120"; +my $pandora_build = "201121"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index f808213259..31157629c9 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201120"; +my $pandora_build = "201121"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index b28a8fef1e..f1a18da413 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201120 +%define release 201121 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index e4422fe194..6f76b0a872 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201120 +%define release 201121 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 4df16f6a71..99b2272996 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201120" +PI_BUILD="201121" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 389bbe2616..5130b22423 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201120"; +my $version = "7.0NG.750 PS201121"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index cf3a6cffdb..81ed8f82b1 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201120"; +my $version = "7.0NG.750 PS201121"; # save program name for logging my $progname = basename($0); From b116f5b171783bf01a2b45b2e04991a53478ae4a Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Sun, 22 Nov 2020 01:00:15 +0100 Subject: [PATCH 103/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index f5fa214929..49194abc23 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201121 +Version: 7.0NG.750-201122 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 675e6a37f0..f346e2c3a9 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201121" +pandora_version="7.0NG.750-201122" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 82e85c1580..19e739ac16 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201121'; +use constant AGENT_BUILD => '201122'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 67e6c5887c..792696cb05 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201121 +%define release 201122 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index d14e9ac588..e19c1dff1f 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201121 +%define release 201122 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 0a0a137475..8c3f087bf9 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201121" +PI_BUILD="201122" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 140a5bfb4b..79041450e9 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201121} +{201122} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 6e75c9138e..dcc2105fa8 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201121)") +#define PANDORA_VERSION ("7.0NG.750(Build 201122)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 545c00acc3..51696c9c76 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201121))" + VALUE "ProductVersion", "(7.0NG.750(Build 201122))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index c1e9ad510a..15082883cc 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201121 +Version: 7.0NG.750-201122 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index d7f6c1da0d..abc88680d3 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201121" +pandora_version="7.0NG.750-201122" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e1bdaf3cc5..c7aa77b623 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201121'; +$build_version = 'PC201122'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 82ee459209..bb2a2973fc 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201121'; + $build = '201122'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 715e6a94fe..b322f27438 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201121 +%define release 201122 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 2d09f3b6fb..e808ba5f99 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201121 +%define release 201122 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index d70f053ab1..f7e690905f 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201121 +%define release 201122 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 711c2cd964..5d11b2f4ef 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201121 +Version: 7.0NG.750-201122 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 952df312c4..fe683bfdea 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201121" +pandora_version="7.0NG.750-201122" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 3c46f4cd71..7f0e383d53 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201121"; +my $pandora_build = "201122"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 31157629c9..020681a06f 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201121"; +my $pandora_build = "201122"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index f1a18da413..49c8246f8f 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201121 +%define release 201122 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 6f76b0a872..8d38adc0d1 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201121 +%define release 201122 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 99b2272996..d6b31fb653 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201121" +PI_BUILD="201122" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 5130b22423..4b507340f5 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201121"; +my $version = "7.0NG.750 PS201122"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 81ed8f82b1..1afe5418fe 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201121"; +my $version = "7.0NG.750 PS201122"; # save program name for logging my $progname = basename($0); From 7f8324266d3b3fdcb367664897838b3421623afc Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Mon, 23 Nov 2020 01:00:16 +0100 Subject: [PATCH 104/104] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 49194abc23..c8eea02fb7 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.750-201122 +Version: 7.0NG.750-201123 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index f346e2c3a9..5e440bdeac 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201122" +pandora_version="7.0NG.750-201123" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 19e739ac16..e186f1acdd 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.750'; -use constant AGENT_BUILD => '201122'; +use constant AGENT_BUILD => '201123'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 792696cb05..9f3ebf71f8 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201122 +%define release 201123 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index e19c1dff1f..1e57d03518 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.750 -%define release 201122 +%define release 201123 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 8c3f087bf9..77209d6a29 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201122" +PI_BUILD="201123" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 79041450e9..0adc7de316 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{201122} +{201123} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index dcc2105fa8..22ea7a82ce 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.750(Build 201122)") +#define PANDORA_VERSION ("7.0NG.750(Build 201123)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 51696c9c76..3c4a7cb83f 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.750(Build 201122))" + VALUE "ProductVersion", "(7.0NG.750(Build 201123))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 15082883cc..f560cd0126 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.750-201122 +Version: 7.0NG.750-201123 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index abc88680d3..42b044ae66 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201122" +pandora_version="7.0NG.750-201123" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index c7aa77b623..72332b699e 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC201122'; +$build_version = 'PC201123'; $pandora_version = 'v7.0NG.750'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index bb2a2973fc..9283f6b267 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.750'; - $build = '201122'; + $build = '201123'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index b322f27438..beae98c702 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201122 +%define release 201123 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index e808ba5f99..243b8ac9e8 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201122 +%define release 201123 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index f7e690905f..8ee2af75d9 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.750 -%define release 201122 +%define release 201123 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 5d11b2f4ef..f98a259d24 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.750-201122 +Version: 7.0NG.750-201123 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index fe683bfdea..28893137b2 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.750-201122" +pandora_version="7.0NG.750-201123" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 7f0e383d53..f9961df655 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201122"; +my $pandora_build = "201123"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 020681a06f..6a9bdcc9bd 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.750"; -my $pandora_build = "201122"; +my $pandora_build = "201123"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 49c8246f8f..660011d6f0 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201122 +%define release 201123 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 8d38adc0d1..1de21220a6 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.750 -%define release 201122 +%define release 201123 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index d6b31fb653..871e768e3c 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.750" -PI_BUILD="201122" +PI_BUILD="201123" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 4b507340f5..2c55dbf933 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.750 PS201122"; +my $version = "7.0NG.750 PS201123"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 1afe5418fe..011225cdec 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.750 PS201122"; +my $version = "7.0NG.750 PS201123"; # save program name for logging my $progname = basename($0);