Merge remote-tracking branch 'origin/develop' into 2615-Bug_Session_Timeout
This commit is contained in:
commit
322c76b5e1
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.729-181120
|
||||
Version: 7.0NG.729-181121
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.729-181120"
|
||||
pandora_version="7.0NG.729-181121"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -42,7 +42,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.729';
|
||||
use constant AGENT_BUILD => '181120';
|
||||
use constant AGENT_BUILD => '181121';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.729
|
||||
%define release 181120
|
||||
%define release 181121
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.729
|
||||
%define release 181120
|
||||
%define release 181121
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.729"
|
||||
PI_BUILD="181120"
|
||||
PI_BUILD="181121"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{181120}
|
||||
{181121}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.729(Build 181120)")
|
||||
#define PANDORA_VERSION ("7.0NG.729(Build 181121)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.729(Build 181120))"
|
||||
VALUE "ProductVersion", "(7.0NG.729(Build 181121))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.729-181120
|
||||
Version: 7.0NG.729-181121
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.729-181120"
|
||||
pandora_version="7.0NG.729-181121"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC181120';
|
||||
$build_version = 'PC181121';
|
||||
$pandora_version = 'v7.0NG.729';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.729';
|
||||
$build = '181120';
|
||||
$build = '181121';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.729
|
||||
%define release 181120
|
||||
%define release 181121
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.729
|
||||
%define release 181120
|
||||
%define release 181121
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.729-181120
|
||||
Version: 7.0NG.729-181121
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.729-181120"
|
||||
pandora_version="7.0NG.729-181121"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -45,7 +45,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.729";
|
||||
my $pandora_build = "181120";
|
||||
my $pandora_build = "181121";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -111,6 +111,7 @@ use warnings;
|
|||
|
||||
use DBI;
|
||||
use Encode;
|
||||
use Encode::CN;
|
||||
use XML::Simple;
|
||||
use HTML::Entities;
|
||||
use Time::Local;
|
||||
|
|
|
@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.729";
|
||||
my $pandora_build = "181120";
|
||||
my $pandora_build = "181121";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
|
|
@ -68,6 +68,7 @@ our @EXPORT = qw(
|
|||
PROVISIONINGSERVER
|
||||
MIGRATIONSERVER
|
||||
METACONSOLE_LICENSE
|
||||
OFFLINE_LICENSE
|
||||
$DEVNULL
|
||||
$OS
|
||||
$OS_VERSION
|
||||
|
@ -93,6 +94,7 @@ our @EXPORT = qw(
|
|||
sqlWrap
|
||||
is_numeric
|
||||
is_metaconsole
|
||||
is_offline
|
||||
to_number
|
||||
clean_blank
|
||||
pandora_sendmail
|
||||
|
@ -152,9 +154,12 @@ use constant MODULE_WARNING => 2;
|
|||
use constant MODULE_UNKNOWN => 3;
|
||||
use constant MODULE_NOTINIT => 4;
|
||||
|
||||
# Value for a metaconsole license type
|
||||
# Mask for a metaconsole license type
|
||||
use constant METACONSOLE_LICENSE => 0x01;
|
||||
|
||||
# Mask for an offline license type
|
||||
use constant OFFLINE_LICENSE => 0x02;
|
||||
|
||||
# Alert modes
|
||||
use constant RECOVERED_ALERT => 0;
|
||||
use constant FIRED_ALERT => 1;
|
||||
|
@ -1639,7 +1644,7 @@ sub is_metaconsole ($) {
|
|||
my ($pa_config) = @_;
|
||||
|
||||
if (defined($pa_config->{"license_type"}) &&
|
||||
$pa_config->{"license_type"} == METACONSOLE_LICENSE &&
|
||||
($pa_config->{"license_type"} & METACONSOLE_LICENSE) &&
|
||||
$pa_config->{"node_metaconsole"} == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
@ -1647,6 +1652,20 @@ sub is_metaconsole ($) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Returns 1 if a valid offline license is configured, 0 otherwise.
|
||||
###############################################################################
|
||||
sub is_offline ($) {
|
||||
my ($pa_config) = @_;
|
||||
|
||||
if (defined($pa_config->{"license_type"}) &&
|
||||
($pa_config->{"license_type"} & OFFLINE_LICENSE)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Check if a given variable contents a number
|
||||
###############################################################################
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.729
|
||||
%define release 181120
|
||||
%define release 181121
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.729
|
||||
%define release 181120
|
||||
%define release 181121
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.729"
|
||||
PI_BUILD="181120"
|
||||
PI_BUILD="181121"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
|
|
@ -34,7 +34,7 @@ use PandoraFMS::Config;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.729 PS181120";
|
||||
my $version = "7.0NG.729 PS181121";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
@ -1042,8 +1042,20 @@ else {
|
|||
|
||||
# Connect to the DB
|
||||
my $dbh = db_connect ($conf{'dbengine'}, $conf{'dbname'}, $conf{'dbhost'}, $conf{'dbport'}, $conf{'dbuser'}, $conf{'dbpass'});
|
||||
my $history_dbh = ($conf{'_history_db_enabled'} eq '1') ? db_connect ($conf{'dbengine'}, $conf{'_history_db_name'},
|
||||
$conf{'_history_db_host'}, $conf{'_history_db_port'}, $conf{'_history_db_user'}, $conf{'_history_db_pass'}) : undef;
|
||||
my $history_dbh = undef;
|
||||
is_metaconsole(\%conf);
|
||||
if ($conf{'_history_db_enabled'} eq '1') {
|
||||
eval {
|
||||
$history_dbh = db_connect ($conf{'dbengine'}, $conf{'_history_db_name'}, $conf{'_history_db_host'}, $conf{'_history_db_port'}, $conf{'_history_db_user'}, $conf{'_history_db_pass'});
|
||||
};
|
||||
if ($@) {
|
||||
if (is_offline(\%conf)) {
|
||||
log_message ('!', "Cannot connect to the history database. Skipping.");
|
||||
} else {
|
||||
die ("$@\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Get a lock
|
||||
my $lock = db_get_lock ($dbh, 'pandora_db');
|
||||
|
@ -1055,13 +1067,13 @@ if ($lock == 0 && $conf{'_force'} == 0) {
|
|||
# Main
|
||||
pandoradb_main(\%conf, $dbh, $history_dbh);
|
||||
|
||||
# Cleanup and exit
|
||||
db_disconnect ($history_dbh) if defined ($history_dbh);
|
||||
db_disconnect ($dbh);
|
||||
|
||||
# Release the lock
|
||||
if ($lock == 1) {
|
||||
db_release_lock ($dbh, 'pandora_db');
|
||||
}
|
||||
|
||||
exit 0;
|
||||
# Cleanup and exit
|
||||
db_disconnect ($history_dbh) if defined ($history_dbh);
|
||||
db_disconnect ($dbh);
|
||||
|
||||
exit 0;
|
||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.729 PS181120";
|
||||
my $version = "7.0NG.729 PS181121";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
Loading…
Reference in New Issue