Merge branch 'develop' of https://github.com/pandorafms/pandorafms into develop
This commit is contained in:
commit
440687c0d7
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 6.0dev-150625
|
||||
Version: 6.0dev-150626
|
||||
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="6.0dev-150625"
|
||||
pandora_version="6.0dev-150626"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -41,7 +41,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '6.0dev';
|
||||
use constant AGENT_BUILD => '150625';
|
||||
use constant AGENT_BUILD => '150626';
|
||||
|
||||
# Commands to retrieve total memory information in kB
|
||||
use constant TOTALMEMORY_CMDS => {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 6.0dev
|
||||
%define release 150625
|
||||
%define release 150626
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 6.0dev
|
||||
%define release 150625
|
||||
%define release 150626
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{150625}
|
||||
{150626}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("6.0dev(Build 150625)")
|
||||
#define PANDORA_VERSION ("6.0dev(Build 150626)")
|
||||
|
||||
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", "(6.0dev(Build 150625))"
|
||||
VALUE "ProductVersion", "(6.0dev(Build 150626))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 6.0dev-150625
|
||||
Version: 6.0dev-150626
|
||||
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="6.0dev-150625"
|
||||
pandora_version="6.0dev-150626"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -185,13 +185,13 @@ switch ($config["dbtype"]) {
|
|||
|
||||
render_info_data ("SELECT value
|
||||
FROM tupdate_settings
|
||||
WHERE key = 'customer_key'", "Update Key");
|
||||
WHERE \"key\" = 'customer_key'", "Update Key");
|
||||
render_info_data ("SELECT value
|
||||
FROM tupdate_settings
|
||||
WHERE key = 'updating_code_path'", "Updating code path");
|
||||
WHERE \"key\" = 'updating_code_path'", "Updating code path");
|
||||
render_info_data ("SELECT value
|
||||
FROM tupdate_settings
|
||||
WHERE key = 'current_update'", "Current Update #");
|
||||
WHERE \"key\" = 'current_update'", "Current Update #");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ switch ($config['dbtype']) {
|
|||
$type_escaped = "type";
|
||||
break;
|
||||
case "oracle":
|
||||
$type_escaped = db_encapsule_fields_with_same_name_to_instructions(
|
||||
$type_escaped = db_escape_key_identifier(
|
||||
"type");
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1077,7 +1077,7 @@ switch ($action) {
|
|||
case "oracle":
|
||||
if (isset($values['type'])) {
|
||||
$values[
|
||||
db_encapsule_fields_with_same_name_to_instructions(
|
||||
db_escape_key_identifier(
|
||||
"type")] = $values['type'];
|
||||
unset($values['type']);
|
||||
}
|
||||
|
@ -1335,7 +1335,7 @@ switch ($action) {
|
|||
case "oracle":
|
||||
if (isset($values['type'])) {
|
||||
$values[
|
||||
db_encapsule_fields_with_same_name_to_instructions(
|
||||
db_escape_key_identifier(
|
||||
"type")] = $values['type'];
|
||||
unset($values['type']);
|
||||
}
|
||||
|
|
|
@ -28,8 +28,10 @@ ui_print_page_header (__('License management'), "images/extensions.png", false,
|
|||
|
||||
if ($update_settings) {
|
||||
foreach ($_POST['keys'] as $key => $value) {
|
||||
db_process_sql_update('tupdate_settings',
|
||||
array('value' => $value), array('key' => $key));
|
||||
db_process_sql_update(
|
||||
'tupdate_settings',
|
||||
array('value' => $value),
|
||||
array(db_escape_key_identifier('key') => $key));
|
||||
}
|
||||
|
||||
ui_print_success_message(__('License updated'));
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC150625';
|
||||
$build_version = 'PC150626';
|
||||
$pandora_version = 'v6.0dev';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -44,6 +44,9 @@ function config_create_value ($token, $value) {
|
|||
function config_update_value ($token, $value) {
|
||||
global $config;
|
||||
|
||||
// Include functions_io to can call __() function
|
||||
include_once($config['homedir'] . '/include/functions_io.php');
|
||||
|
||||
if ($token == 'list_ACL_IPs_for_API') {
|
||||
$value = str_replace(array("\r\n", "\r", "\n"), ";",
|
||||
io_safe_output($value));
|
||||
|
@ -167,7 +170,7 @@ function config_update_config () {
|
|||
$license_info_key = get_parameter('license_info_key', '');
|
||||
if (!empty($license_info_key)) {
|
||||
$values = array("value" => $license_info_key);
|
||||
$where = array("key" => 'customer_key');
|
||||
$where = array(db_escape_key_identifier('key') => 'customer_key');
|
||||
$update_manage_settings_result = db_process_sql_update('tupdate_settings', $values, $where);
|
||||
if ($update_manage_settings_result === false)
|
||||
$error_update[] = __('License information');
|
||||
|
|
|
@ -125,6 +125,11 @@ function db_encapsule_fields_with_same_name_to_instructions($field) {
|
|||
}
|
||||
}
|
||||
|
||||
// Alias for 'db_encapsule_fields_with_same_name_to_instructions'
|
||||
function db_escape_key_identifier($field) {
|
||||
return db_encapsule_fields_with_same_name_to_instructions($field);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an audit log entry (new function in 3.0)
|
||||
*
|
||||
|
|
|
@ -24,31 +24,14 @@ function update_manager_get_config_values() {
|
|||
global $build_version;
|
||||
global $pandora_version;
|
||||
|
||||
switch ($config["dbtype"]) {
|
||||
case "postgresql":
|
||||
case "mysql":
|
||||
$license = db_get_value(
|
||||
db_encapsule_fields_with_same_name_to_instructions('value'),
|
||||
'tupdate_settings',
|
||||
db_encapsule_fields_with_same_name_to_instructions('key'),
|
||||
'customer_key');
|
||||
break;
|
||||
case 'oracle':
|
||||
$license = db_get_value(
|
||||
'value',
|
||||
'tupdate_settings',
|
||||
'key',
|
||||
'customer_key');
|
||||
break;
|
||||
}
|
||||
$license = db_get_value(
|
||||
'value',
|
||||
'tupdate_settings',
|
||||
db_escape_key_identifier('key'),
|
||||
'customer_key');
|
||||
|
||||
$limit_count = db_get_value_sql("SELECT count(*) FROM tagente");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return array(
|
||||
'license' => $license,
|
||||
'current_update' => update_manager_get_current_package(),
|
||||
|
@ -497,8 +480,8 @@ function update_manager_set_current_package($current_package) {
|
|||
$token = 'current_package';
|
||||
}
|
||||
|
||||
$col_value = db_encapsule_fields_with_same_name_to_instructions('value');
|
||||
$col_key = db_encapsule_fields_with_same_name_to_instructions('key');
|
||||
$col_value = 'value';
|
||||
$col_key = db_escape_key_identifier('key');
|
||||
|
||||
$value = db_get_value($col_value,
|
||||
'tupdate_settings', $col_key, $token);
|
||||
|
@ -523,26 +506,11 @@ function update_manager_get_current_package() {
|
|||
else {
|
||||
$token = 'current_package';
|
||||
}
|
||||
|
||||
switch ($config["dbtype"]) {
|
||||
case "postgresql":
|
||||
case "mysql":
|
||||
$current_update = db_get_value(
|
||||
db_encapsule_fields_with_same_name_to_instructions('value'),
|
||||
'tupdate_settings',
|
||||
db_encapsule_fields_with_same_name_to_instructions('key'),
|
||||
$token);
|
||||
break;
|
||||
case "oracle":
|
||||
$current_update = db_get_value(
|
||||
'value',
|
||||
'tupdate_settings',
|
||||
'key',
|
||||
$token);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$current_update = db_get_value(
|
||||
'value',
|
||||
'tupdate_settings',
|
||||
db_escape_key_identifier('key'),
|
||||
$token);
|
||||
|
||||
if ($current_update === false) {
|
||||
$current_update = 0;
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '6.0dev';
|
||||
$build = '150625';
|
||||
$build = '150626';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 6.0dev
|
||||
%define release 150625
|
||||
%define release 150626
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 6.0dev
|
||||
%define release 150625
|
||||
%define release 150626
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -1956,7 +1956,7 @@ CREATE OR REPLACE TRIGGER tcategory_inc BEFORE INSERT ON tcategory REFERENCING N
|
|||
-- Table `tupdate_settings`
|
||||
-- ---------------------------------------------------------------------
|
||||
CREATE TABLE tupdate_settings (
|
||||
key VARCHAR2(255) DEFAULT '' PRIMARY KEY,
|
||||
"key" VARCHAR2(255) DEFAULT '' PRIMARY KEY,
|
||||
value VARCHAR2(255) DEFAULT ''
|
||||
);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('graph_res','5'),
|
||||
('step_compact','1'),
|
||||
('db_scheme_version','6.0dev'),
|
||||
('db_scheme_build','PD150625'),
|
||||
('db_scheme_build','PD150626'),
|
||||
('show_unknown','0'),
|
||||
('show_lastalerts','1'),
|
||||
('style','pandora'),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 6.0dev-150625
|
||||
Version: 6.0dev-150626
|
||||
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="6.0dev-150625"
|
||||
pandora_version="6.0dev-150626"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -43,7 +43,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "6.0dev";
|
||||
my $pandora_build = "150625";
|
||||
my $pandora_build = "150626";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 6.0dev
|
||||
%define release 150625
|
||||
%define release 150626
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 6.0dev
|
||||
%define release 150625
|
||||
%define release 150626
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -33,7 +33,7 @@ use PandoraFMS::Tools;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "6.0dev PS150625";
|
||||
my $version = "6.0dev PS150626";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -35,7 +35,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "6.0dev PS150625";
|
||||
my $version = "6.0dev PS150626";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
Loading…
Reference in New Issue