Merge remote-tracking branch 'origin/develop' into ent-4513-bugs-en-password-policy

This commit is contained in:
marcos.alconada 2019-08-26 08:09:14 +02:00
commit efd6a72bb8
33 changed files with 96 additions and 62 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.738-190822 Version: 7.0NG.738-190826
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

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

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.738 %define version 7.0NG.738
%define release 190822 %define release 190826
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.738 %define version 7.0NG.738
%define release 190822 %define release 190826
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.738" PI_VERSION="7.0NG.738"
PI_BUILD="190822" PI_BUILD="190826"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{190822} {190826}
ViewReadme ViewReadme
{Yes} {Yes}

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.738-190822 Version: 7.0NG.738-190826
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

@ -804,20 +804,20 @@ $table_adv_options .= '
'.$table_adv_gis.$table_adv_agent_icon.$table_adv_url.$table_adv_quiet.$table_adv_status.$table_adv_remote.$table_adv_safe.' '.$table_adv_gis.$table_adv_agent_icon.$table_adv_url.$table_adv_quiet.$table_adv_status.$table_adv_remote.$table_adv_safe.'
</div>'; </div>';
if (enterprise_installed()) {
echo '<div class="ui_toggle">'; echo '<div class="ui_toggle">';
ui_toggle( ui_toggle(
$table_adv_options, $table_adv_options,
__('Advanced options'), __('Advanced options'),
'', '',
'', '',
true, true,
false, false,
'white_box white_box_opened', 'white_box white_box_opened',
'no-border flex' 'no-border flex'
); );
echo '</div>'; echo '</div>';
}
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
@ -931,18 +931,48 @@ foreach ($fields as $field) {
$i += 2; $i += 2;
} }
if (!empty($fields)) { if (enterprise_installed()) {
if (!empty($fields)) {
echo '<div class="ui_toggle">';
ui_toggle(
html_print_table($table, true),
__('Custom fields'),
'',
'',
true,
false,
'white_box white_box_opened',
'no-border'
);
echo '</div>';
}
} else {
echo '<div class="ui_toggle">'; echo '<div class="ui_toggle">';
ui_toggle( ui_toggle(
html_print_table($table, true), $table_adv_options,
__('Custom fields'), __('Advanced options'),
'', '',
'', '',
true, true,
false, false,
'white_box white_box_opened', 'white_box white_box_opened',
'no-border' 'no-border flex'
); );
if (!empty($fields)) {
ui_toggle(
html_print_table($table, true),
__('Custom fields'),
'',
'',
true,
false,
'white_box white_box_opened',
'no-border'
);
}
echo '<div class="action-buttons" style="display: flex; justify-content: flex-end; align-items: center; width: '.$table->width.'">';
echo '</div>'; echo '</div>';
} }

View File

@ -1290,12 +1290,14 @@ if ($get_extended_event) {
$details = events_page_details($event, $server); $details = events_page_details($event, $server);
if ($meta) {
metaconsole_restore_db();
}
if (events_has_extended_info($event['id_evento']) === true) { if (events_has_extended_info($event['id_evento']) === true) {
$related = events_page_related($event, $server); $related = events_page_related($event, $server);
} }
// Juanma (09/05/2014) Fix: Needs to reconnect to node, in previous funct
// node connection was lost.
if ($meta) { if ($meta) {
$server = metaconsole_get_connection_by_id($server_id); $server = metaconsole_get_connection_by_id($server_id);
metaconsole_connect($server); metaconsole_connect($server);
@ -1574,7 +1576,6 @@ if ($get_list_events_agents) {
$date_from = get_parameter('date_from'); $date_from = get_parameter('date_from');
$date_to = get_parameter('date_to'); $date_to = get_parameter('date_to');
$id_user = $config['id_user']; $id_user = $config['id_user'];
$server_id = get_parameter('server_id');
$returned_sql = events_sql_events_grouped_agents( $returned_sql = events_sql_events_grouped_agents(
$id_agent, $id_agent,
@ -1810,4 +1811,3 @@ if ($get_events_fired) {
echo io_json_mb_encode($return); echo io_json_mb_encode($return);
} }

View File

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

View File

@ -2852,6 +2852,8 @@ function print_audit_csv($data)
global $config; global $config;
global $graphic_type; global $graphic_type;
$divider = $config['csv_divider'];
if (!$data) { if (!$data) {
echo __('No data found to export'); echo __('No data found to export');
return 0; return 0;
@ -2869,9 +2871,9 @@ function print_audit_csv($data)
// BOM // BOM
print pack('C*', 0xEF, 0xBB, 0xBF); print pack('C*', 0xEF, 0xBB, 0xBF);
echo __('User').';'.__('Action').';'.__('Date').';'.__('Source IP').';'.__('Comments')."\n"; echo __('User').$divider.__('Action').$divider.__('Date').$divider.__('Source IP').$divider.__('Comments')."\n";
foreach ($data as $line) { foreach ($data as $line) {
echo io_safe_output($line['id_usuario']).';'.io_safe_output($line['accion']).';'.date($config['date_format'], $line['utimestamp']).';'.$line['ip_origen'].';'.io_safe_output($line['descripcion'])."\n"; echo io_safe_output($line['id_usuario']).$divider.io_safe_output($line['accion']).$divider.io_safe_output(date($config['date_format'], $line['utimestamp'])).$divider.$line['ip_origen'].$divider.io_safe_output($line['descripcion'])."\n";
} }
exit; exit;

View File

@ -878,9 +878,11 @@ function events_get_all(
$agent_join_filters = []; $agent_join_filters = [];
$tagente_table = 'tagente'; $tagente_table = 'tagente';
$tagente_field = 'id_agente'; $tagente_field = 'id_agente';
$conditionMetaconsole = '';
if (is_metaconsole()) { if (is_metaconsole()) {
$tagente_table = 'tmetaconsole_agent'; $tagente_table = 'tmetaconsole_agent';
$tagente_field = 'id_tagente'; $tagente_field = 'id_tagente';
$conditionMetaconsole = ' AND ta.id_tmetaconsole_setup = te.server_id ';
} }
// Agent alias. // Agent alias.
@ -1214,12 +1216,12 @@ function events_get_all(
$server_join = ''; $server_join = '';
if (is_metaconsole()) { if (is_metaconsole()) {
$server_join = ' INNER JOIN tmetaconsole_setup ts $server_join = ' LEFT JOIN tmetaconsole_setup ts
ON ts.id = te.server_id AND ts.server_name = ta.server_name'; ON ts.id = te.server_id';
if (!empty($filter['server_id'])) { if (!empty($filter['server_id'])) {
$server_join = sprintf( $server_join = sprintf(
' INNER JOIN tmetaconsole_setup ts ' LEFT JOIN tmetaconsole_setup ts
ON ts.id = te.server_id AND ts.server_name = ta.server_name AND ts.id= %d', ON ts.id = te.server_id AND ts.id= %d',
$filter['server_id'] $filter['server_id']
); );
} }
@ -1254,6 +1256,7 @@ function events_get_all(
%s JOIN %s ta %s JOIN %s ta
ON ta.%s = te.id_agente ON ta.%s = te.id_agente
%s %s
%s
%s JOIN tgrupo tg %s JOIN tgrupo tg
ON te.id_grupo = tg.id_grupo ON te.id_grupo = tg.id_grupo
%s %s
@ -1273,6 +1276,7 @@ function events_get_all(
$tagente_join, $tagente_join,
$tagente_table, $tagente_table,
$tagente_field, $tagente_field,
$conditionMetaconsole,
join(' ', $agent_join_filters), join(' ', $agent_join_filters),
$tgrupo_join, $tgrupo_join,
join(' ', $tgrupo_join_filters), join(' ', $tgrupo_join_filters),
@ -3883,7 +3887,7 @@ function events_page_details($event, $server='')
global $config; global $config;
// If server is provided, get the hash parameters. // If server is provided, get the hash parameters.
if (!empty($server) && defined('METACONSOLE')) { if (!empty($server) && is_metaconsole()) {
$hashdata = metaconsole_get_server_hashdata($server); $hashdata = metaconsole_get_server_hashdata($server);
$hashstring = '&amp;loginhash=auto&loginhash_data='.$hashdata.'&loginhash_user='.str_rot13($config['id_user']); $hashstring = '&amp;loginhash=auto&loginhash_data='.$hashdata.'&loginhash_user='.str_rot13($config['id_user']);
$serverstring = $server['server_url'].'/'; $serverstring = $server['server_url'].'/';
@ -4185,10 +4189,6 @@ function events_page_details($event, $server='')
$details = '<div id="extended_event_details_page" class="extended_event_pages">'.html_print_table($table_details, true).'</div>'; $details = '<div id="extended_event_details_page" class="extended_event_pages">'.html_print_table($table_details, true).'</div>';
if (!empty($server) && defined('METACONSOLE')) {
metaconsole_restore_db();
}
return $details; return $details;
} }

View File

@ -1487,7 +1487,7 @@ function ui_require_javascript_file($name, $path='include/javascript/', $echo_ta
$filename = $path.$name.'.js'; $filename = $path.$name.'.js';
if ($echo_tag) { if ($echo_tag) {
echo '<script type="text/javascript" src="'.ui_get_full_url(false, false, false, false).$filename.'"></script>'; echo '<script type="text/javascript" src="'.ui_get_full_url($filename, false, false, false).'"></script>';
return null; return null;
} }
@ -1504,7 +1504,7 @@ function ui_require_javascript_file($name, $path='include/javascript/', $echo_ta
return false; return false;
} }
if (defined('METACONSOLE')) { if (is_metaconsole()) {
$config['js'][$name] = '../../'.$filename; $config['js'][$name] = '../../'.$filename;
} else { } else {
$config['js'][$name] = $filename; $config['js'][$name] = $filename;

View File

@ -24,7 +24,7 @@ function include_javascript_dependencies_flot_graph($return=false)
$is_include_javascript = true; $is_include_javascript = true;
$metaconsole_hack = ''; $metaconsole_hack = '';
if (defined('METACONSOLE')) { if (is_metaconsole()) {
$metaconsole_hack = '../../'; $metaconsole_hack = '../../';
} }

View File

@ -129,7 +129,7 @@
<div style='height: 10px'> <div style='height: 10px'>
<?php <?php
$version = '7.0NG.738'; $version = '7.0NG.738';
$build = '190822'; $build = '190826';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -246,6 +246,8 @@ if (is_ajax()) {
$fields[] = 'ta.server_name as server_name'; $fields[] = 'ta.server_name as server_name';
} else { } else {
$fields[] = 'ts.server_name as server_name'; $fields[] = 'ts.server_name as server_name';
$fields[] = 'te.id_agentmodule';
$fields[] = 'te.server_id';
} }
$events = events_get_all( $events = events_get_all(

View File

@ -43,7 +43,7 @@ if ($searchGraphs) {
$totalGraphs = (int) db_get_value_filter('COUNT(id_graph) AS count', 'tgraph', $filter); $totalGraphs = (int) db_get_value_filter('COUNT(id_graph) AS count', 'tgraph', $filter);
if (! $only_count && $totalGraphs > 0) { if ($totalGraphs > 0) {
$filter['limit'] = $config['block_size']; $filter['limit'] = $config['block_size'];
$filter['offset'] = (int) get_parameter('offset'); $filter['offset'] = (int) get_parameter('offset');
$graphs = db_get_all_rows_filter('tgraph', $filter, $columns); $graphs = db_get_all_rows_filter('tgraph', $filter, $columns);

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.738-190822 Version: 7.0NG.738-190826
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.738 %define version 7.0NG.738
%define release 190822 %define release 190826
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.738 %define version 7.0NG.738
%define release 190822 %define release 190826
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

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

View File

@ -34,7 +34,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.738 PS190822"; my $version = "7.0NG.738 PS190826";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

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