From 53d0bfe13da7f723d3442d4ff7fc68a9130e5cf4 Mon Sep 17 00:00:00 2001 From: Adrien Morais Date: Mon, 15 Jul 2019 16:09:09 +0200 Subject: [PATCH] chore(build): New version released 18.10.6 --- .../centreon-18.10/centreon-18.10.6.rst | 36 ++++- doc/en/release_notes/centreon-18.10/index.rst | 1 + .../centreon-18.10/centreon-18.10.6.rst | 36 ++++- doc/fr/release_notes/centreon-18.10/index.rst | 1 + www/install/php/Update-18.10.6.php | 138 ++++++++++++++++++ .../sql/centreon/Update-DB-18.10.6.sql | 10 ++ 6 files changed, 208 insertions(+), 14 deletions(-) create mode 100644 www/install/php/Update-18.10.6.php diff --git a/doc/en/release_notes/centreon-18.10/centreon-18.10.6.rst b/doc/en/release_notes/centreon-18.10/centreon-18.10.6.rst index 2be7172f992..bc8308da55e 100644 --- a/doc/en/release_notes/centreon-18.10/centreon-18.10.6.rst +++ b/doc/en/release_notes/centreon-18.10/centreon-18.10.6.rst @@ -1,24 +1,46 @@ -#################### +==================== Centreon Web 18.10.6 -#################### +==================== Enhancements ------------ -* [SNMP Trap] Increase size of special command field to text +* [LDAP] Optimizing data sent when importing contact (#7559) +* [Traps] Increase trap special command database field (#7610) +* [Traps] Make @HOSTID@ macro available for trap configuration (#7592) +* [UI] Enhance helper (tooltip) for mail configuration (#7584) +* [UI] Translate notification delay parameters (#7696) +* [Traps] You can create a trap with matching mode regexp (#7679) Bug fixes --------- +* [Installation] Missing template directory in tar.gz package +* [Centcore] Issue fixed with commands that were overwritten (#7650) +* [Remote Server] Do not compare bugfix version on task import (#7638) +* [Remote Server] Set task in failed if an error appears during import/export (#7634) +* [Remote Server] Increase size of database field to store large FQDN (#7637 closes #7615) +* [Remote Server] Update only properties of selected poller (#7633) +* [Monitoring] Correctly display services with special character "+" (#7624) +* [Configuration] Correctly search services by "disabled" state (#7612) +* [Downtime] Correctly compute downtime duration & end date (#7601) +* [Event Logs] Several issues fixed on CSV export (group arrows, host filter) +* [Configuration] Correctly save service_interleave_factor value in Engine configuration form (#7591) +* [Reporting] Correctly apply ACL on reporting dashboard (#7604) +* [UI] Add scrollbar to remote server configuration wizard (#7600) +* [UI] Change icon cursor when exporting graphs to PNG (#7613) +* [Upgrade] Execute again missing PHP update from 2.8.27 (#7434) +* [Upgrade] add missing upgrade script for 2.8.28 + Documentation ------------- +* [Onboarding] Improve actual content for Quick Start and add more (#7609) + Security fixes -------------- -Technical ---------- +* [UI] add escapeshellarg to nagios_bin binary passed to shell_exec (#7694 closes CVE-2019-13024) Known issue ------------ - +----------- \ No newline at end of file diff --git a/doc/en/release_notes/centreon-18.10/index.rst b/doc/en/release_notes/centreon-18.10/index.rst index 80e0b0df122..d360528b689 100644 --- a/doc/en/release_notes/centreon-18.10/index.rst +++ b/doc/en/release_notes/centreon-18.10/index.rst @@ -7,6 +7,7 @@ Please find here the release notes dedicated to the last 18.10.x version of Cent .. toctree:: :maxdepth: 1 + centreon-18.10.6 centreon-18.10.5 centreon-18.10.4 centreon-18.10.3 diff --git a/doc/fr/release_notes/centreon-18.10/centreon-18.10.6.rst b/doc/fr/release_notes/centreon-18.10/centreon-18.10.6.rst index 2be7172f992..bc8308da55e 100644 --- a/doc/fr/release_notes/centreon-18.10/centreon-18.10.6.rst +++ b/doc/fr/release_notes/centreon-18.10/centreon-18.10.6.rst @@ -1,24 +1,46 @@ -#################### +==================== Centreon Web 18.10.6 -#################### +==================== Enhancements ------------ -* [SNMP Trap] Increase size of special command field to text +* [LDAP] Optimizing data sent when importing contact (#7559) +* [Traps] Increase trap special command database field (#7610) +* [Traps] Make @HOSTID@ macro available for trap configuration (#7592) +* [UI] Enhance helper (tooltip) for mail configuration (#7584) +* [UI] Translate notification delay parameters (#7696) +* [Traps] You can create a trap with matching mode regexp (#7679) Bug fixes --------- +* [Installation] Missing template directory in tar.gz package +* [Centcore] Issue fixed with commands that were overwritten (#7650) +* [Remote Server] Do not compare bugfix version on task import (#7638) +* [Remote Server] Set task in failed if an error appears during import/export (#7634) +* [Remote Server] Increase size of database field to store large FQDN (#7637 closes #7615) +* [Remote Server] Update only properties of selected poller (#7633) +* [Monitoring] Correctly display services with special character "+" (#7624) +* [Configuration] Correctly search services by "disabled" state (#7612) +* [Downtime] Correctly compute downtime duration & end date (#7601) +* [Event Logs] Several issues fixed on CSV export (group arrows, host filter) +* [Configuration] Correctly save service_interleave_factor value in Engine configuration form (#7591) +* [Reporting] Correctly apply ACL on reporting dashboard (#7604) +* [UI] Add scrollbar to remote server configuration wizard (#7600) +* [UI] Change icon cursor when exporting graphs to PNG (#7613) +* [Upgrade] Execute again missing PHP update from 2.8.27 (#7434) +* [Upgrade] add missing upgrade script for 2.8.28 + Documentation ------------- +* [Onboarding] Improve actual content for Quick Start and add more (#7609) + Security fixes -------------- -Technical ---------- +* [UI] add escapeshellarg to nagios_bin binary passed to shell_exec (#7694 closes CVE-2019-13024) Known issue ------------ - +----------- \ No newline at end of file diff --git a/doc/fr/release_notes/centreon-18.10/index.rst b/doc/fr/release_notes/centreon-18.10/index.rst index 80e0b0df122..d360528b689 100644 --- a/doc/fr/release_notes/centreon-18.10/index.rst +++ b/doc/fr/release_notes/centreon-18.10/index.rst @@ -7,6 +7,7 @@ Please find here the release notes dedicated to the last 18.10.x version of Cent .. toctree:: :maxdepth: 1 + centreon-18.10.6 centreon-18.10.5 centreon-18.10.4 centreon-18.10.3 diff --git a/www/install/php/Update-18.10.6.php b/www/install/php/Update-18.10.6.php new file mode 100644 index 00000000000..6f4d5a5c474 --- /dev/null +++ b/www/install/php/Update-18.10.6.php @@ -0,0 +1,138 @@ +. + * + * Linking this program statically or dynamically with other modules is making a + * combined work based on this program. Thus, the terms and conditions of the GNU + * General Public License cover the whole combination. + * + * As a special exception, the copyright holders of this program give Centreon + * permission to link this program with independent modules to produce an executable, + * regardless of the license terms of these independent modules, and to copy and + * distribute the resulting executable under terms of Centreon choice, provided that + * Centreon also meet, for each linked independent module, the terms and conditions + * of the license of that module. An independent module is a module which is not + * derived from this program. If you modify this program, you may extend this + * exception to your version of the program, but you are not obliged to do so. If you + * do not wish to do so, delete this exception statement from your version. + * + * For more information : contact@centreon.com + * + * + */ + +/* + * Redo all PHP upgrades from 2.8.26 to 18.10.0 for people migrating from 2.8.27 before PR #7416 + */ +$result = $pearDB->query( + "SELECT `value` FROM `informations` WHERE `key` IN ('appKey', 'isRemote', 'isCentral')" +); + +if ($result->rowCount() == 0) { + $uniqueKey = md5(uniqid(rand(), true)); + $pearDB->query( + "INSERT INTO `informations` (`key`,`value`) VALUES ('appKey', '" . $uniqueKey . "')" + ); + $pearDB->query( + "INSERT INTO `informations` (`key`,`value`) VALUES ('isRemote', 'no')" + ); + $pearDB->query( + "INSERT INTO `informations` (`key`,`value`) VALUES ('isCentral', 'no')" + ); +} + +// Retrieve current Nagios plugins path. +$result = $pearDB->query( + "SELECT value FROM options WHERE `key`='nagios_path_plugins'" +); +$row = $result->fetch(); + +// Update to new path if necessary. +if ($row + && preg_match('#/usr/lib/nagios/plugins/?#', $row['value']) + && is_dir('/usr/lib64/nagios/plugins') +) { + // options table. + $pearDB->query( + "UPDATE options SET value='/usr/lib64/nagios/plugins/' WHERE `key`='nagios_path_plugins'" + ); + + // USER1 resource. + $pearDB->query( + "UPDATE cfg_resource SET resource_line='/usr/lib64/nagios/plugins' " . + "WHERE resource_line='/usr/lib/nagios/plugins'" + ); +} + +/* + * fix menu acl when child is checked but its parent is not checked + */ + +// get all acl menu configurations +$aclTopologies = $pearDB->query( + 'SELECT acl_topo_id FROM acl_topology' +); +while ($aclTopology = $aclTopologies->fetch()) { + $aclTopologyId = $aclTopology['acl_topo_id']; + + // get parents of topologies which are at least read only + $statement = $pearDB->prepare( + 'SELECT t.topology_page, t.topology_id, t.topology_parent ' . + 'FROM acl_topology_relations atr, topology t ' . + 'WHERE acl_topo_id = :topologyId ' . + 'AND atr.topology_topology_id = t.topology_id ' . + 'AND atr.access_right IN (1,2) ' // read/write and read only + ); + $statement->bindParam(':topologyId', $aclTopologyId, \PDO::PARAM_INT); + $statement->execute(); + $topologies = $statement->fetchAll(\PDO::FETCH_UNIQUE | \PDO::FETCH_ASSOC); + + // get missing parent topology relations + $aclToInsert = []; + foreach ($topologies as $topologyPage => $topologyParameters) { + if (isset($topologyParameters['topology_parent']) + && !isset($topologies[$topologyParameters['topology_parent']]) + && !in_array($topologyParameters['topology_parent'], $aclToInsert) + ) { + if (strlen($topologyPage) === 5) { // level 3 + $levelOne = substr($topologyPage, 0, 1); // get level 1 from beginning of topology_page + if (!isset($aclToInsert[$levelOne])) { + $aclToInsert[] = $levelOne; + } + $levelTwo = substr($topologyPage, 0, 3); // get level 2 from beginning of topology_page + if (!isset($aclToInsert[$levelTwo])) { + $aclToInsert[] = $levelTwo; + } + } elseif (strlen($topologyPage) === 3) { // level 2 + $levelOne = substr($topologyPage, 0, 1); // get level 1 from beginning of topology_page + if (!isset($aclToInsert[$levelOne])) { + $aclToInsert[] = $levelOne; + } + } + } + } + + // insert missing parent topology relations + if (count($aclToInsert)) { + $statement = $pearDB->query( + 'INSERT INTO acl_topology_relations(acl_topo_id, topology_topology_id) ' . + 'SELECT ' . $aclTopologyId . ', t.topology_id ' . + 'FROM topology t ' . + 'WHERE t.topology_page IN (' . implode(',', $aclToInsert) . ')' + ); + } +} + diff --git a/www/install/sql/centreon/Update-DB-18.10.6.sql b/www/install/sql/centreon/Update-DB-18.10.6.sql index 8903112fd33..de58a23f0a7 100644 --- a/www/install/sql/centreon/Update-DB-18.10.6.sql +++ b/www/install/sql/centreon/Update-DB-18.10.6.sql @@ -1,2 +1,12 @@ -- Change traps_execution_command from varchar(255) to text ALTER TABLE `traps` MODIFY COLUMN `traps_execution_command` text DEFAULT NULL; +-- +-- Change IP field from varchar(16) to varchar(255) +-- +ALTER TABLE `remote_servers` MODIFY COLUMN `ip` VARCHAR(255) NOT NULL; + +-- Add trap regexp matching +ALTER TABLE `traps` ADD COLUMN IF NOT EXISTS `traps_mode` ENUM('0', '1') DEFAULT '0' AFTER `traps_oid`; + +-- Add trap filter +ALTER TABLE `traps` MODIFY COLUMN `traps_exec_interval_type` ENUM('0','1','2','3') NULL DEFAULT '0'; \ No newline at end of file