From 34c3b0042606c0180775064c7d10dc3354abf0e5 Mon Sep 17 00:00:00 2001 From: Calvo Date: Fri, 13 Aug 2021 15:57:01 +0200 Subject: [PATCH 01/15] WIP: Revision ACL part 3 --- pandora_console/include/ajax/events.php | 8 ++++++++ pandora_console/include/functions_menu.php | 11 ++++++++--- pandora_console/operation/events/events.php | 12 ++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index d08defb37b..1b89581955 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -1295,6 +1295,14 @@ if ($get_extended_event) { && isset($config['event_replication']) && $config['event_replication'] == 1 && $config['show_events_in_local'] == 1 + || enterprise_hook( + 'enterprise_acl', + [ + $config['id_user'], + 'eventos', + 'execute_event_responses', + ] + ) === false ) { $readonly = true; } diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 7a748c08c1..9410e2e8b0 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -494,9 +494,10 @@ function menu_add_extras(&$menu) $menu_extra['gservers']['sub']['godmode/servers/manage_recontask_form']['text'] = __('Manage recontask'); + $menu_extra['gagente']['sub']['godmode/category/edit_category']['text'] = __('Manage module categories'); + $menu_extra['gmodules']['sub']['godmode/modules/manage_network_templates_form']['text'] = __('Module templates management'); $menu_extra['gmodules']['sub']['enterprise/godmode/modules/manage_inventory_modules_form']['text'] = __('Inventory modules management'); - $menu_extra['gmodules']['sub']['godmode/tag/edit_tag']['text'] = __('Tags management'); $menu_extra['gagente']['sub']['godmode/agentes/configurar_agente']['text'] = __('Agents management'); @@ -509,6 +510,7 @@ function menu_add_extras(&$menu) $menu_extra['network']['sub']['godmode/reporting/visual_console_builder']['text'] = __('Builder visual console'); $menu_extra['eventos']['sub']['godmode/events/events']['text'] = __('Administration events'); + $menu_extra['eventos']['sub']['execute_event_responses']['text'] = __('Execute event responses'); $menu_extra['reporting']['sub']['operation/reporting/reporting_viewer']['text'] = __('View reporting'); $menu_extra['reporting']['sub']['operation/reporting/graph_viewer']['text'] = __('Graph viewer'); @@ -520,7 +522,8 @@ function menu_add_extras(&$menu) $menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_editor']['text'] = __('Manage graph templates'); $menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_item_editor']['text'] = __('Graph template items'); $menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_wizard']['text'] = __('Graph template wizard'); - + $menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=wizard&action=wizard']['text'] = __('Templates wizard'); + $menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=template&action=list_template']['text'] = __('Templates'); if ($config['activate_gis']) { $menu_extra['godgismaps']['sub']['godmode/gis_maps/configure_gis_map']['text'] = __('Manage GIS Maps'); } @@ -528,7 +531,6 @@ function menu_add_extras(&$menu) $menu_extra['workspace']['sub']['operation/incidents/incident_statistics']['text'] = __('Incidents statistics'); $menu_extra['workspace']['sub']['operation/messages/message_edit']['text'] = __('Manage messages'); - $menu_extra['gagente']['sub']['godmode/groups/configure_group']['text'] = __('Manage groups'); $menu_extra['gagente']['sub']['godmode/groups/configure_modu_group']['text'] = __('Manage module groups'); $menu_extra['gagente']['sub']['godmode/agentes/configure_field']['text'] = __('Manage custom field'); @@ -547,6 +549,9 @@ function menu_add_extras(&$menu) $menu_extra['workspace']['sub']['operation/incidents/incident_detail']['text'] = __('Manage incident'); + $menu_extra['gusuarios']['sub']['godmode/groups/configure_group']['text'] = __('Manage groups'); + $menu_extra['gusuarios']['sub']['godmode/tag/edit_tag']['text'] = __('Tags management'); + // Duplicate extensions as sec=extension to check it from url. foreach ($menu as $k => $m) { if (!isset($m['sub'])) { diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 332a2fd35c..48071659f0 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -998,6 +998,18 @@ if (is_metaconsole() !== true) { } } +if (enterprise_hook( + 'enterprise_acl', + [ + $config['id_user'], + 'eventos', + 'execute_event_responses', + ] +) === false +) { + $readonly = true; +} + /* * Load filter form. */ From 2ca6f525985f272a510868c83a2a07b173b2fe8c Mon Sep 17 00:00:00 2001 From: Calvo Date: Thu, 2 Sep 2021 15:43:20 +0200 Subject: [PATCH 02/15] Revision ACL part 3 --- pandora_console/include/functions_menu.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 06289247a8..e7d524b817 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -527,7 +527,6 @@ function menu_add_extras(&$menu) $menu_extra['galertas']['sub']['godmode/alerts/configure_alert_action']['text'] = __('Manage alert actions'); $menu_extra['galertas']['sub']['godmode/alerts/configure_alert_command']['text'] = __('Manage commands'); - $menu_extra['galertas']['sub']['enterprise/godmode/alerts/alert_correlation']['text'] = __('Manage event alerts'); $menu_extra['gservers']['sub']['enterprise/godmode/servers/manage_export_form']['text'] = __('Manage export targets'); @@ -551,7 +550,9 @@ function menu_add_extras(&$menu) foreach ($m['sub'] as $kk => $mm) { if (isset($mm['sec'])) { - $menu_extra[$mm['sec']]['sub'][$kk]['text'] = $mm['text']; + if (empty($menu[$mm['sec']]['sub'][$kk]['text']) === true) { + $menu_extra[$mm['sec']]['sub'][$kk]['text'] = $mm['text']; + } } } } From f1f984614fedc7e755df9fec57fb18b9226531b5 Mon Sep 17 00:00:00 2001 From: Calvo Date: Fri, 22 Oct 2021 12:02:31 +0200 Subject: [PATCH 03/15] Unify search criteria case insensitive --- .../include/functions_custom_graphs.php | 4 ++-- .../include/javascript/multiselect_filtered.js | 18 ++++++++++++++++-- .../operation/agentes/alerts_status.php | 3 ++- .../operation/search_alerts.getdata.php | 10 +++++----- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/pandora_console/include/functions_custom_graphs.php b/pandora_console/include/functions_custom_graphs.php index bab64dd5fe..b9b9c0bb59 100644 --- a/pandora_console/include/functions_custom_graphs.php +++ b/pandora_console/include/functions_custom_graphs.php @@ -194,11 +194,11 @@ function custom_graphs_get_user($id_user=0, $only_names=false, $returnAllGroup=t function custom_graphs_search($id_group, $search) { if ($id_group != '' && $search != '') { - $all_graphs = db_get_all_rows_sql('select * from tgraph where id_group = '.$id_group.' AND name LIKE "%'.$search.'%"'); + $all_graphs = db_get_all_rows_sql('select * from tgraph where id_group = '.$id_group.' AND (name LIKE "%'.$search.'%" OR description LIKE "'.$search.'")'); } else if ($id_group != '') { $all_graphs = db_get_all_rows_sql('select * from tgraph where id_group = '.$id_group.''); } else { - $all_graphs = db_get_all_rows_sql('select * from tgraph where name LIKE "%'.$search.'%"'); + $all_graphs = db_get_all_rows_sql('select * from tgraph where name LIKE "%'.$search.'%" OR description LIKE "'.$search.'"'); } if ($all_graphs === false) { diff --git a/pandora_console/include/javascript/multiselect_filtered.js b/pandora_console/include/javascript/multiselect_filtered.js index 358dadcd68..c813c8e26a 100644 --- a/pandora_console/include/javascript/multiselect_filtered.js +++ b/pandora_console/include/javascript/multiselect_filtered.js @@ -1,5 +1,19 @@ /* global $, jQuery*/ +/** + * Custom selector for case instensitive contains. + */ +jQuery.expr[":"].iContains = jQuery.expr.createPseudo(function(arg) { + return function(elem) { + return ( + jQuery(elem) + .text() + .toUpperCase() + .indexOf(arg.toUpperCase()) >= 0 + ); + }; +}); + /** * Add modules from available to selected. */ @@ -58,14 +72,14 @@ function filterItems(id, str) { $("#" + id + " option[value=0]").remove(); // Move not matching elements filtered to tmp-id. - var tmp = $("#" + id + " option:not(:contains(" + str + "))").toArray(); + var tmp = $("#" + id + " option:not(:iContains(" + str + "))").toArray(); tmp.forEach(function(item) { $("#tmp-" + id).append(item); $(this).remove(); }); // Move matching filter back to id. - tmp = $("#tmp-" + id + " option:contains(" + str + ")").toArray(); + tmp = $("#tmp-" + id + " option:iContains(" + str + ")").toArray(); tmp.forEach(function(item) { $("#" + id).append(item); $(this).remove(); diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index 713ab22169..c5d597dd39 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -239,7 +239,8 @@ if ($free_search != '') { WHERE id_agente IN ( SELECT id_agente FROM tagente - WHERE nombre LIKE "%'.$free_search.'%") OR alias LIKE "%'.$free_search.'%")'.')'; + WHERE nombre COLLATE utf8_general_ci LIKE "%'.$free_search.'%") + OR alias COLLATE utf8_general_ci LIKE "%'.$free_search.'%")'.')'; } else { $whereAlertSimple = ''; } diff --git a/pandora_console/operation/search_alerts.getdata.php b/pandora_console/operation/search_alerts.getdata.php index ccda38ee7e..73e2d8a048 100644 --- a/pandora_console/operation/search_alerts.getdata.php +++ b/pandora_console/operation/search_alerts.getdata.php @@ -139,32 +139,32 @@ if ($searchAlerts) { switch ($config['dbtype']) { case 'mysql': $whereAlerts = 'AND ( - id_alert_template IN (SELECT id FROM talert_templates WHERE name LIKE "%'.$stringSearchSQL.'%") OR + id_alert_template IN (SELECT id FROM talert_templates WHERE name COLLATE utf8_general_ci LIKE "%'.$stringSearchSQL.'%") OR id_alert_template IN ( SELECT id FROM talert_templates WHERE id_alert_action IN ( SELECT id FROM talert_actions - WHERE name LIKE "%'.$stringSearchSQL.'%")) OR + WHERE name COLLATE utf8_general_ci LIKE "%'.$stringSearchSQL.'%")) OR talert_template_modules.id IN ( SELECT id_alert_template_module FROM talert_template_module_actions WHERE id_alert_action IN ( SELECT id FROM talert_actions - WHERE name LIKE "%'.$stringSearchSQL.'%")) OR + WHERE name COLLATE utf8_general_ci LIKE "%'.$stringSearchSQL.'%")) OR id_agent_module IN ( SELECT id_agente_modulo FROM tagente_modulo - WHERE nombre LIKE "%'.$stringSearchSQL.'%") OR + WHERE nombre COLLATE utf8_general_ci LIKE "%'.$stringSearchSQL.'%") OR id_agent_module IN ( SELECT id_agente_modulo FROM tagente_modulo WHERE id_agente IN ( SELECT id_agente FROM tagente - WHERE nombre LIKE "%'.$stringSearchSQL.'%" '.$extra_sql.')) + WHERE nombre COLLATE utf8_general_ci LIKE "%'.$stringSearchSQL.'%" '.$extra_sql.')) )'; break; From c6921efdce09246b35135aea06aa469bf33282f0 Mon Sep 17 00:00:00 2001 From: Calvo Date: Fri, 22 Oct 2021 14:43:14 +0200 Subject: [PATCH 04/15] Unify search criteria case insensitive --- pandora_console/include/db/mysql.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/db/mysql.php b/pandora_console/include/db/mysql.php index fdcf2ba403..5c65c5dff1 100644 --- a/pandora_console/include/db/mysql.php +++ b/pandora_console/include/db/mysql.php @@ -760,7 +760,11 @@ function mysql_db_format_array_where_clause_sql($values, $join='AND', $prefix=fa if ($field[0] != '`') { // If the field is as ., don't scape. if (strstr($field, '.') === false) { - $field = '`'.$field.'`'; + if (preg_match('/(UPPER|LOWER)(.+)/mi', $field)) { + $field = preg_replace('/(UPPER|LOWER])\((.+)\)/mi', '$1(`$2`)', $field); + } else { + $field = '`'.$field.'`'; + } } } From 9c2aae2a44cb054a1cba43c949d0ba06427d29ed Mon Sep 17 00:00:00 2001 From: Junichi Satoh Date: Mon, 8 Nov 2021 10:00:43 +0900 Subject: [PATCH 05/15] Fixed special multibyte characters treatment. They were not converted to html entities when storing to DB. --- pandora_server/lib/PandoraFMS/Tools.pm | 155 ++++++++++++++++++++++++- 1 file changed, 154 insertions(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index e4d605ff12..2d17d53b80 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -376,6 +376,159 @@ my %ENT2CHR = ( 'ouml' => chr(246), 'uacute' => chr(250), 'uuml' => chr(252), +# multibyte characters + 'OElig' => chr(338), + 'oelig' => chr(339), + 'Scaron' => chr(352), + 'scaron' => chr(353), + 'Yuml' => chr(376), + 'fnof' => chr(402), + 'circ' => chr(710), + 'tilde' => chr(732), + 'Alpha' => chr(913), + 'Beta' => chr(914), + 'Gamma' => chr(915), + 'Delta' => chr(916), + 'Epsilon' => chr(917), + 'Zeta' => chr(918), + 'Eta' => chr(919), + 'Theta' => chr(920), + 'Iota' => chr(921), + 'Kappa' => chr(922), + 'Lambda' => chr(923), + 'Mu' => chr(924), + 'Nu' => chr(925), + 'Xi' => chr(926), + 'Omicron' => chr(927), + 'Pi' => chr(928), + 'Rho' => chr(929), + 'Sigma' => chr(931), + 'Tau' => chr(932), + 'Upsilon' => chr(933), + 'Phi' => chr(934), + 'Chi' => chr(935), + 'Psi' => chr(936), + 'Omega' => chr(937), + 'alpha' => chr(945), + 'beta' => chr(946), + 'gamma' => chr(947), + 'delta' => chr(948), + 'epsilon' => chr(949), + 'zeta' => chr(950), + 'eta' => chr(951), + 'theta' => chr(952), + 'iota' => chr(953), + 'kappa' => chr(954), + 'lambda' => chr(955), + 'mu' => chr(956), + 'nu' => chr(957), + 'xi' => chr(958), + 'omicron' => chr(959), + 'pi' => chr(960), + 'rho' => chr(961), + 'sigmaf' => chr(962), + 'sigma' => chr(963), + 'tau' => chr(964), + 'upsilon' => chr(965), + 'phi' => chr(966), + 'chi' => chr(967), + 'psi' => chr(968), + 'omega' => chr(969), + 'thetasym' => chr(977), + 'upsih' => chr(978), + 'piv' => chr(982), + 'ensp' => chr(8194), + 'emsp' => chr(8195), + 'thinsp' => chr(8201), + 'zwnj' => chr(8204), + 'zwj' => chr(8205), + 'lrm' => chr(8206), + 'rlm' => chr(8207), + 'ndash' => chr(8211), + 'mdash' => chr(8212), + 'lsquo' => chr(8216), + 'rsquo' => chr(8217), + 'sbquo' => chr(8218), + 'ldquo' => chr(8220), + 'rdquo' => chr(8221), + 'bdquo' => chr(8222), + 'dagger' => chr(8224), + 'Dagger' => chr(8225), + 'bull' => chr(8226), + 'hellip' => chr(8230), + 'permil' => chr(8240), + 'prime' => chr(8242), + 'Prime' => chr(8243), + 'lsaquo' => chr(8249), + 'rsaquo' => chr(8250), + 'oline' => chr(8254), + 'frasl' => chr(8260), + 'euro' => chr(8364), + 'image' => chr(8465), + 'weierp' => chr(8472), + 'real' => chr(8476), + 'trade' => chr(8482), + 'alefsym' => chr(8501), + 'larr' => chr(8592), + 'uarr' => chr(8593), + 'rarr' => chr(8594), + 'darr' => chr(8595), + 'harr' => chr(8596), + 'crarr' => chr(8629), + 'lArr' => chr(8656), + 'uArr' => chr(8657), + 'rArr' => chr(8658), + 'dArr' => chr(8659), + 'hArr' => chr(8660), + 'forall' => chr(8704), + 'part' => chr(8706), + 'exist' => chr(8707), + 'empty' => chr(8709), + 'nabla' => chr(8711), + 'isin' => chr(8712), + 'notin' => chr(8713), + 'ni' => chr(8715), + 'prod' => chr(8719), + 'sum' => chr(8721), + 'minus' => chr(8722), + 'lowast' => chr(8727), + 'radic' => chr(8730), + 'prop' => chr(8733), + 'infin' => chr(8734), + 'ang' => chr(8736), + 'and' => chr(8743), + 'or' => chr(8744), + 'cap' => chr(8745), + 'cup' => chr(8746), + 'int' => chr(8747), + 'there4' => chr(8756), + 'sim' => chr(8764), + 'cong' => chr(8773), + 'asymp' => chr(8776), + 'ne' => chr(8800), + 'equiv' => chr(8801), + 'le' => chr(8804), + 'ge' => chr(8805), + 'sub' => chr(8834), + 'sup' => chr(8835), + 'nsub' => chr(8836), + 'sube' => chr(8838), + 'supe' => chr(8839), + 'oplus' => chr(8853), + 'otimes' => chr(8855), + 'perp' => chr(8869), + 'sdot' => chr(8901), + 'lceil' => chr(8968), + 'rceil' => chr(8969), + 'lfloor' => chr(8970), + 'rfloor' => chr(8971), + 'lang' => chr(9001), + 'rang' => chr(9002), + 'loz' => chr(9674), + 'spades' => chr(9824), + 'clubs' => chr(9827), + 'hearts' => chr(9829), + 'diams' => chr(9830), ); # Construct the character to entity mapping. @@ -475,7 +628,7 @@ sub safe_input($) { return "" unless defined($value); - $value =~ s/([\x00-\xFF])/$CHR2ENT{$1}||$1/ge; + $value =~ s/(.)/$CHR2ENT{$1}||$1/ge; return $value; } From 02b3bc85740e18e207cc76385e70476387ae865f Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 23 Nov 2021 10:18:20 +0100 Subject: [PATCH 06/15] fix setup centraliced active directory --- pandora_console/godmode/setup/setup_auth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/setup/setup_auth.php b/pandora_console/godmode/setup/setup_auth.php index d0177731e2..ea3397b30f 100644 --- a/pandora_console/godmode/setup/setup_auth.php +++ b/pandora_console/godmode/setup/setup_auth.php @@ -60,6 +60,7 @@ if (is_ajax()) { $table->data['fallback_local_auth'] = $row; if (enterprise_installed()) { + $is_management_allowed = is_management_allowed(); // Autocreate remote users. $row = []; $row['name'] = __('Autocreate remote users'); @@ -67,7 +68,7 @@ if (is_ajax()) { 'autocreate_remote_users', 1, $config['autocreate_remote_users'], - false, + (is_metaconsole() === false) ? !$is_management_allowed : false, '', '', true From 951f29769b819ba47b3f3545ae07d00b5da1eeee Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 26 Nov 2021 10:31:16 +0100 Subject: [PATCH 07/15] allow online patches in decimal format --- pandora_console/godmode/um_client/lib/UpdateManager/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/um_client/lib/UpdateManager/Client.php b/pandora_console/godmode/um_client/lib/UpdateManager/Client.php index 27425f535f..bb62d63959 100644 --- a/pandora_console/godmode/um_client/lib/UpdateManager/Client.php +++ b/pandora_console/godmode/um_client/lib/UpdateManager/Client.php @@ -835,7 +835,7 @@ class Client function ($carry, $item) { $matches = []; if (is_array($item) !== true - && preg_match('/(\d+)\.tar/', $item, $matches) > 0 + && preg_match('/([\d\.\d]+?)\.tar/', $item, $matches) > 0 ) { $carry[] = [ 'version' => $matches[1], From eba4a1b0db1580e8cd66c48d25232f41a79046dd Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 26 Nov 2021 12:36:49 +0000 Subject: [PATCH 08/15] repoDisk patch (MC => Nodes) --- .../godmode/um_client/lib/UpdateManager/RepoDisk.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/um_client/lib/UpdateManager/RepoDisk.php b/pandora_console/godmode/um_client/lib/UpdateManager/RepoDisk.php index bb6368a823..426cf4be4e 100644 --- a/pandora_console/godmode/um_client/lib/UpdateManager/RepoDisk.php +++ b/pandora_console/godmode/um_client/lib/UpdateManager/RepoDisk.php @@ -75,8 +75,8 @@ class RepoDisk extends Repo $this->files = []; while ($file_name = readdir($dh)) { // Files must contain a version number. - if (preg_match('/(\d+)\_x86_64.'.$this->extension.'$/', $file_name, $utimestamp) === 1 - || preg_match('/(\d+)\.'.$this->extension.'$/', $file_name, $utimestamp) === 1 + if (preg_match('/([\d\.]+?)\_x86_64.'.$this->extension.'$/', $file_name, $utimestamp) === 1 + || preg_match('/([\d\.]+?)\.'.$this->extension.'$/', $file_name, $utimestamp) === 1 ) { // Add the file to the repository. $this->files[$utimestamp[1]] = $file_name; From 73cde9ee482b7f0bbad94329c026b9bd2263b79f Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Mon, 29 Nov 2021 14:58:34 +0100 Subject: [PATCH 09/15] db changes --- pandora_console/extras/mr/51.sql | 12 ++++++++++++ .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 12 ++++++++++++ pandora_console/pandoradb.sql | 15 +++++++++++++-- 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/pandora_console/extras/mr/51.sql b/pandora_console/extras/mr/51.sql index 0a6e837195..2a6de782c6 100644 --- a/pandora_console/extras/mr/51.sql +++ b/pandora_console/extras/mr/51.sql @@ -13,6 +13,18 @@ CREATE TABLE IF NOT EXISTS `talert_calendar` ( INSERT IGNORE INTO `talert_calendar` VALUES (1, 'Default', 0, 'Default calendar'); +CREATE TABLE IF NOT EXISTS `tipam_network_location` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL default '', + PRIMARY KEY (`id`), + UNIQUE (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT IGNORE INTO `tipam_network_location` (`name`) SELECT `location` FROM `tipam_network` WHERE `location` <> ''; +UPDATE `tipam_network` INNER JOIN `tipam_network_location` ON tipam_network_location.name=tipam_network.location SET tipam_network.location=tipam_network_location.id; +ALTER TABLE `tipam_network` MODIFY `location` int(10) unsigned NULL; +ALTER TABLE `tipam_network` ADD FOREIGN KEY (`location`) REFERENCES `tipam_network_location`(`id`) ON DELETE CASCADE; + ALTER TABLE `talert_special_days` ADD COLUMN `id_calendar` int(10) unsigned NOT NULL DEFAULT 1; ALTER TABLE `talert_special_days` ADD COLUMN `day_code` tinyint(2) unsigned NOT NULL DEFAULT 0; 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 b31b13875c..536aa8f22d 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 @@ -4045,6 +4045,18 @@ CREATE TABLE IF NOT EXISTS `tipam_supernet_network` ( FOREIGN KEY (`id_network`) REFERENCES tipam_network(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `tipam_network_location` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL default '', + PRIMARY KEY (`id`), + UNIQUE (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT IGNORE INTO `tipam_network_location` (`name`) SELECT `location` FROM `tipam_network` WHERE `location` <> ''; +UPDATE `tipam_network` INNER JOIN `tipam_network_location` ON tipam_network_location.name=tipam_network.location SET tipam_network.location=tipam_network_location.id; +ALTER TABLE `tipam_network` MODIFY `location` int(10) unsigned NULL; +ALTER TABLE `tipam_network` ADD FOREIGN KEY (`location`) REFERENCES `tipam_network_location`(`id`) ON DELETE CASCADE; + SET @insert_type = 3; SET @insert_name = 'IPAM Recon'; SET @insert_description = 'This script is used to automatically detect network hosts availability and name, used as Recon Custom Script in the recon task. Parameters used are:\n\n* custom_field1 = network. i.e.: 192.168.100.0/24\n* custom_field2 = associated IPAM network id. i.e.: 4. Please do not change this value, it is assigned automatically in IPAM management.\n\nSee documentation for more information.'; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 3a08bc06e7..f6f1d2b898 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3949,7 +3949,7 @@ CREATE TABLE IF NOT EXISTS `tipam_network` ( `network` varchar(100) NOT NULL default '', `name_network` varchar(255) default '', `description` text NOT NULL, - `location` tinytext NOT NULL, + `location` int(10) unsigned NULL, `id_recon_task` int(10) unsigned NOT NULL, `scan_interval` tinyint(2) default 1, `monitoring` tinyint(2) default 0, @@ -3957,7 +3957,8 @@ CREATE TABLE IF NOT EXISTS `tipam_network` ( `lightweight_mode` tinyint(2) default 0, `users_operator` text, PRIMARY KEY (`id`), - FOREIGN KEY (`id_recon_task`) REFERENCES trecon_task(`id_rt`) ON DELETE CASCADE + FOREIGN KEY (`id_recon_task`) REFERENCES trecon_task(`id_rt`) ON DELETE CASCADE, + FOREIGN KEY (`location`) REFERENCES `tipam_network_location`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------------------------------------------------- @@ -4039,6 +4040,16 @@ CREATE TABLE IF NOT EXISTS `tipam_supernet_network` ( FOREIGN KEY (`id_network`) REFERENCES tipam_network(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- ---------------------------------------------------------------------- +-- Table `tipam_network_location` +-- ---------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `tipam_network_location` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL default '', + PRIMARY KEY (`id`), + UNIQUE (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- ---------------------------------------------------------------------- -- Table `tsync_queue` -- ---------------------------------------------------------------------- From c289f67395e06c5c7bcafb177a27444f7006af8d Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 29 Nov 2021 15:54:45 +0100 Subject: [PATCH 10/15] #8307 Added contextmenu in supernet map --- .../include/class/NetworkMap.class.php | 9 ++++ .../include/javascript/SimpleMapController.js | 49 +++++++++++++++++++ .../include/styles/js/jquery.contextMenu.css | 5 +- 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index eac465b001..f7b9ddec79 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -3409,6 +3409,15 @@ class NetworkMap $output .= ''."\n"; + ui_require_css_file('jquery.contextMenu', 'include/styles/js/'); + $output .= ''; $output .= '
label > * { From 8c8b5aee3006d0e562e7b1f4f8167ef2ebbef98e Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Mon, 29 Nov 2021 16:34:32 +0100 Subject: [PATCH 11/15] minor change --- pandora_console/pandoradb.sql | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index f6f1d2b898..0b320185df 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3941,6 +3941,16 @@ CREATE TABLE `tnode_relations` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- ---------------------------------------------------------------------- +-- Table `tipam_network_location` +-- ---------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `tipam_network_location` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL default '', + PRIMARY KEY (`id`), + UNIQUE (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- ---------------------------------------------------------------------- -- Table `tipam_network` -- ---------------------------------------------------------------------- @@ -4040,16 +4050,6 @@ CREATE TABLE IF NOT EXISTS `tipam_supernet_network` ( FOREIGN KEY (`id_network`) REFERENCES tipam_network(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- ---------------------------------------------------------------------- --- Table `tipam_network_location` --- ---------------------------------------------------------------------- -CREATE TABLE IF NOT EXISTS `tipam_network_location` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(100) NOT NULL default '', - PRIMARY KEY (`id`), - UNIQUE (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -- ---------------------------------------------------------------------- -- Table `tsync_queue` -- ---------------------------------------------------------------------- From 622d125b36e454b1d5a00fff4283758ad0a84b63 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 30 Nov 2021 01:00:24 +0100 Subject: [PATCH 12/15] 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 be3d8e10bf..64c6a7569a 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.758.1-211129 +Version: 7.0NG.758.1-211130 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 df4cf5f656..fe29a31d7e 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.758.1-211129" +pandora_version="7.0NG.758.1-211130" 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 2e17a6963c..6aa8e5261d 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.758.1'; -use constant AGENT_BUILD => '211129'; +use constant AGENT_BUILD => '211130'; # 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 fd31dbce17..ba4d913d7c 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.758.1 -%define release 211129 +%define release 211130 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 9dc24accc2..590f8aba54 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.758.1 -%define release 211129 +%define release 211130 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 3efc5fe83f..0eb296672d 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.758.1" -PI_BUILD="211129" +PI_BUILD="211130" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c964c8f08b..cb683a5902 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{211129} +{211130} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index b24568653b..f73715c851 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.758.1 Build 211129") +#define PANDORA_VERSION ("7.0NG.758.1 Build 211130") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index cc9fb09a37..5a048d989e 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.758.1(Build 211129))" + VALUE "ProductVersion", "(7.0NG.758.1(Build 211130))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2bd98bd3ac..7ad83c0a6a 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.758.1-211129 +Version: 7.0NG.758.1-211130 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 bcc3b66704..cbd441dc28 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.758.1-211129" +pandora_version="7.0NG.758.1-211130" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e8866b4ec8..2da12d3f45 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 = 'PC211129'; +$build_version = 'PC211130'; $pandora_version = 'v7.0NG.758.1'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index dacc5f5294..3c4d0aac20 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 77c764d747..90dc44cf81 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.758.1 -%define release 211129 +%define release 211130 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 8f9fecf7b7..525bb6f3de 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.758.1 -%define release 211129 +%define release 211130 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 84a452f9df..3eefa43620 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.758.1" -PI_BUILD="211129" +PI_BUILD="211130" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 64ea7babc0..170979110d 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.758.1 Build 211129"; +my $version = "7.0NG.758.1 Build 211130"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index c7e049c0c8..8f604cca53 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.758.1 Build 211129"; +my $version = "7.0NG.758.1 Build 211130"; # save program name for logging my $progname = basename($0); From 347769299bd478e34819c16c938c0dfc16c48de1 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 30 Nov 2021 14:23:19 +0100 Subject: [PATCH 13/15] outocreate remote user centralized node --- pandora_console/extras/mr/51.sql | 2 ++ pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pandora_console/extras/mr/51.sql b/pandora_console/extras/mr/51.sql index 0a6e837195..d358c8b349 100644 --- a/pandora_console/extras/mr/51.sql +++ b/pandora_console/extras/mr/51.sql @@ -29,4 +29,6 @@ ALTER TABLE `talert_special_days` ADD FOREIGN KEY (`id_calendar`) REFERENCES `ta ALTER TABLE `tagent_repository` ADD COLUMN `deployment_timeout` INT UNSIGNED DEFAULT 600 AFTER `path`; +UPDATE `tconfig` c1 JOIN (select count(*) as n FROM `tconfig` c2 WHERE (c2.`token` = "node_metaconsole" AND c2.`value` = 1) OR (c2.`token` = "centralized_management" AND c2.`value` = 1) ) v SET c1. `value` = 0 WHERE c1.token = "autocreate_remote_users" AND v.n = 2; + COMMIT; 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 b31b13875c..b82023a1a3 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 @@ -4252,3 +4252,5 @@ UPDATE `talert_special_days` set `day_code` = 7 WHERE `same_day` = 'sunday'; ALTER TABLE `talert_special_days` DROP COLUMN `same_day`; ALTER TABLE `talert_special_days` ADD FOREIGN KEY (`id_calendar`) REFERENCES `talert_calendar`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; + +UPDATE `tconfig` c1 JOIN (select count(*) as n FROM `tconfig` c2 WHERE (c2.`token` = "node_metaconsole" AND c2.`value` = 1) OR (c2.`token` = "centralized_management" AND c2.`value` = 1) ) v SET c1. `value` = 0 WHERE c1.token = "autocreate_remote_users" AND v.n = 2; From b63a33026b8d600d7d630f45bd86d2e962ddf8ea Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 1 Dec 2021 01:00:20 +0100 Subject: [PATCH 14/15] 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 64c6a7569a..61baf52206 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.758.1-211130 +Version: 7.0NG.758.1-211201 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 fe29a31d7e..fcf8dcb41c 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.758.1-211130" +pandora_version="7.0NG.758.1-211201" 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 6aa8e5261d..2dfcc310df 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.758.1'; -use constant AGENT_BUILD => '211130'; +use constant AGENT_BUILD => '211201'; # 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 ba4d913d7c..bef9afb04e 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.758.1 -%define release 211130 +%define release 211201 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 590f8aba54..5c7e7c371f 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.758.1 -%define release 211130 +%define release 211201 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 0eb296672d..09791e3f3f 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.758.1" -PI_BUILD="211130" +PI_BUILD="211201" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index cb683a5902..5f379ce838 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{211130} +{211201} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f73715c851..c91e0f7299 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.758.1 Build 211130") +#define PANDORA_VERSION ("7.0NG.758.1 Build 211201") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 5a048d989e..b384f17d0e 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.758.1(Build 211130))" + VALUE "ProductVersion", "(7.0NG.758.1(Build 211201))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7ad83c0a6a..4b34a82014 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.758.1-211130 +Version: 7.0NG.758.1-211201 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 cbd441dc28..5e9e002d2d 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.758.1-211130" +pandora_version="7.0NG.758.1-211201" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 2da12d3f45..575d4b0c98 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 = 'PC211130'; +$build_version = 'PC211201'; $pandora_version = 'v7.0NG.758.1'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 3c4d0aac20..7a6a930b54 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 90dc44cf81..379c83c85d 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.758.1 -%define release 211130 +%define release 211201 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 525bb6f3de..59a70c5604 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.758.1 -%define release 211130 +%define release 211201 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 3eefa43620..7e7eff990c 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.758.1" -PI_BUILD="211130" +PI_BUILD="211201" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 170979110d..f5214f92bf 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.758.1 Build 211130"; +my $version = "7.0NG.758.1 Build 211201"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 8f604cca53..c0d1ef1a45 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.758.1 Build 211130"; +my $version = "7.0NG.758.1 Build 211201"; # save program name for logging my $progname = basename($0); From e693f7c3a222aa43eb8659396255d6483a6afd57 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 2 Dec 2021 01:00:18 +0100 Subject: [PATCH 15/15] 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 61baf52206..3343300263 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.758.1-211201 +Version: 7.0NG.758.1-211202 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 fcf8dcb41c..75c10e62a9 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.758.1-211201" +pandora_version="7.0NG.758.1-211202" 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 2dfcc310df..5191dfd441 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.758.1'; -use constant AGENT_BUILD => '211201'; +use constant AGENT_BUILD => '211202'; # 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 bef9afb04e..7a368a719d 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.758.1 -%define release 211201 +%define release 211202 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 5c7e7c371f..9ac41f09cf 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.758.1 -%define release 211201 +%define release 211202 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 09791e3f3f..848ba856f3 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.758.1" -PI_BUILD="211201" +PI_BUILD="211202" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 5f379ce838..573dd22140 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{211201} +{211202} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index c91e0f7299..fd2590629e 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.758.1 Build 211201") +#define PANDORA_VERSION ("7.0NG.758.1 Build 211202") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index b384f17d0e..2922e23115 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.758.1(Build 211201))" + VALUE "ProductVersion", "(7.0NG.758.1(Build 211202))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4b34a82014..289fe3e3f6 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.758.1-211201 +Version: 7.0NG.758.1-211202 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 5e9e002d2d..fb9cce6203 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.758.1-211201" +pandora_version="7.0NG.758.1-211202" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 575d4b0c98..94506faddd 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 = 'PC211201'; +$build_version = 'PC211202'; $pandora_version = 'v7.0NG.758.1'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 7a6a930b54..89b8ca722b 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 379c83c85d..add1a657e4 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.758.1 -%define release 211201 +%define release 211202 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 59a70c5604..bec3a1a955 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.758.1 -%define release 211201 +%define release 211202 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 7e7eff990c..2c0b2d6447 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.758.1" -PI_BUILD="211201" +PI_BUILD="211202" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index f5214f92bf..23987ea7f8 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.758.1 Build 211201"; +my $version = "7.0NG.758.1 Build 211202"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index c0d1ef1a45..5141f28aea 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.758.1 Build 211201"; +my $version = "7.0NG.758.1 Build 211202"; # save program name for logging my $progname = basename($0);