diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 737a66c464..e963a33c6f 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.753-210408 +Version: 7.0NG.753-210413 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 ef667db16c..37c244d375 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.753-210408" +pandora_version="7.0NG.753-210413" 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 7d923037bf..80ed75f00e 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.753'; -use constant AGENT_BUILD => '210408'; +use constant AGENT_BUILD => '210413'; # 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 45f72a4bba..0e09334fc1 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.753 -%define release 210408 +%define release 210413 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 0ae192e3fd..6e11e4b8a9 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.753 -%define release 210408 +%define release 210413 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 d10b21e859..b2b6cf3c48 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.753" -PI_BUILD="210408" +PI_BUILD="210413" OS_NAME=`uname -s` FORCE=0 @@ -166,7 +166,7 @@ uninstall () { rm -f $DESTDIR/etc/newsyslog.d/pandora_agent.conf # Remove systemd service if exists - if [ `systemctl --v 2> /dev/null | grep systemd | wc -l` != 0 ] + if [ `command -v systemctl` ] then PANDORA_AGENT_SERVICE="/etc/systemd/system/pandora_agent_daemon.service" rm -f $PANDORA_AGENT_SERVICE @@ -482,7 +482,7 @@ install () { fi # Create systemd service - if [ `systemctl --v 2> /dev/null | grep systemd | wc -l` != 0 ] + if [ `command -v systemctl` ] then echo "Creating systemd service for pandora_agent_daemon" diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 4afe97e093..aba5ef5c1f 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{210408} +{210413} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 123f17b65a..7f71d9300f 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.753(Build 210408)") +#define PANDORA_VERSION ("7.0NG.753(Build 210413)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 316b384943..81f26625ba 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.753(Build 210408))" + VALUE "ProductVersion", "(7.0NG.753(Build 210413))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 03c798f62f..b45ca41795 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.753-210408 +Version: 7.0NG.753-210413 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 c5325e37ba..6d85935138 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.753-210408" +pandora_version="7.0NG.753-210413" package_pear=0 package_pandora=1 diff --git a/pandora_console/ajax.php b/pandora_console/ajax.php index b653fbd5c5..fca916d796 100644 --- a/pandora_console/ajax.php +++ b/pandora_console/ajax.php @@ -61,7 +61,7 @@ if (isset($config['console_log_enabled']) === true ini_set('error_log', $config['homedir'].'/log/console.log'); } else { ini_set('log_errors', 0); - ini_set('error_log', 0); + ini_set('error_log', null); } // Sometimes input is badly retrieved from caller... diff --git a/pandora_console/extras/mr/46.sql b/pandora_console/extras/mr/46.sql index 8a7e18d43c..cec3339dd2 100644 --- a/pandora_console/extras/mr/46.sql +++ b/pandora_console/extras/mr/46.sql @@ -2,6 +2,9 @@ START TRANSACTION; ALTER TABLE `tgrupo` ADD COLUMN `max_agents` int(10) NOT NULL DEFAULT 0; ALTER TABLE `tagent_custom_fields` MODIFY COLUMN `combo_values` TEXT NOT NULL DEFAULT ''; +ALTER TABLE `treport_content` MODIFY `external_source` MEDIUMTEXT; +ALTER TABLE `treport_content_template` MODIFY `external_source` MEDIUMTEXT; + UPDATE `talert_commands` SET `fields_descriptions` = '[\"Event name\",\"Event type\",\"Source\",\"Agent name or _agent_\",\"Event severity\",\"ID extra\",\"Tags separated by commas\",\"Comments\",\"\",\"\"]' WHERE `name` = "Monitoring Event"; 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 581097336f..a0feb894e5 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 @@ -811,7 +811,7 @@ CREATE TABLE IF NOT EXISTS `treport_content_template` ( `description` mediumtext, `text_agent` text, `text` TEXT, - `external_source` Text, + `external_source` mediumtext, `treport_custom_sql_id` INTEGER UNSIGNED default 0, `header_definition` TinyText default NULL, `column_separator` TinyText default NULL, @@ -1741,6 +1741,7 @@ ALTER TABLE `treport_content` ADD COLUMN `landscape` tinyint(1) UNSIGNED NOT NUL ALTER TABLE `treport_content` ADD COLUMN `pagebreak` tinyint(1) UNSIGNED NOT NULL default 0; ALTER TABLE `treport_content` ADD COLUMN `compare_work_time` tinyint(1) UNSIGNED NOT NULL default 0; ALTER TABLE `treport_content` ADD COLUMN `graph_render` tinyint(1) UNSIGNED NOT NULL default 0; +ALTER TABLE `treport_content` MODIFY `external_source` MEDIUMTEXT; -- --------------------------------------------------------------------- -- Table `tmodule_relationship` diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php index 3da840cefa..c71ad1a9fe 100644 --- a/pandora_console/godmode/groups/group_list.php +++ b/pandora_console/godmode/groups/group_list.php @@ -46,7 +46,7 @@ if (is_metaconsole() === true) { } if (is_ajax() === true) { - if (check_acl($config['id_user'], 0, 'AR') === false) { + if ((bool) check_acl($config['id_user'], 0, 'AR') === false) { db_pandora_audit('ACL Violation', 'Trying to access Group Management'); include 'general/noaccess.php'; return; @@ -72,7 +72,7 @@ if (is_ajax() === true) { return; } - if (check_acl($config['id_user'], $id_group, 'AR') === false) { + if ((bool) check_acl($config['id_user'], $id_group, 'AR') === false) { db_pandora_audit( 'ACL Violation', 'Trying to access Alert Management' @@ -114,7 +114,7 @@ if (is_ajax() === true) { ); $force_serialized = (bool) get_parameter('force_serialized', false); - if (check_acl($config['id_user'], $id_group, 'AR') === false) { + if ((bool) check_acl($config['id_user'], $id_group, 'AR') === false) { db_pandora_audit( 'ACL Violation', 'Trying to access Alert Management' @@ -265,15 +265,9 @@ if (is_ajax() === true) { $tab = (string) get_parameter('tab', 'groups'); -if ($tab != 'credbox' && ! check_acl( - $config['id_user'], - 0, - 'PM' -) && ! check_acl( - $config['id_user'], - 0, - 'AW' -) +if ($tab !== 'credbox' + && (bool) check_acl($config['id_user'], 0, 'PM') === false + && (bool) check_acl($config['id_user'], 0, 'AW') === false ) { db_pandora_audit( 'ACL Violation', @@ -281,9 +275,9 @@ if ($tab != 'credbox' && ! check_acl( ); include 'general/noaccess.php'; return; -} else if ($tab == 'credbox' - && check_acl($config['id_user'], 0, 'UM') === false - && check_acl($config['id_user'], 0, 'PM') === false +} else if ($tab === 'credbox' + && (bool) check_acl($config['id_user'], 0, 'UM') === false + && (bool) check_acl($config['id_user'], 0, 'PM') === false ) { db_pandora_audit( 'ACL Violation', @@ -382,7 +376,7 @@ $delete_group = (bool) get_parameter('delete_group'); $pure = get_parameter('pure', 0); // Create group. -if (($create_group) && (check_acl($config['id_user'], 0, 'PM') === true)) { +if (($create_group) && ((bool) check_acl($config['id_user'], 0, 'PM') === true)) { $name = (string) get_parameter('name'); $icon = (string) get_parameter('icon'); $id_parent = (int) get_parameter('id_parent'); @@ -510,7 +504,7 @@ if ($update_group) { } // Delete group. -if (($delete_group) && (check_acl($config['id_user'], 0, 'PM') === true)) { +if (($delete_group) && ((bool) check_acl($config['id_user'], 0, 'PM') === true)) { $id_group = (int) get_parameter('id_group'); $usedGroup = groups_check_used($id_group); diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index bde5b42dfc..bf542482f9 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -506,7 +506,7 @@ $id_os = 0; $server_name = 0; $description = ''; -echo '