Merge remote-tracking branch 'origin/develop' into ent-8817-Falla-proceso-de-merge-en-metaconsola
@ -14,7 +14,7 @@ test:
|
||||
- sed -i "s/_PRODUCT_/$REBRANDING/g" $CI_PROJECT_DIR/pandora_server/Makefile.PL
|
||||
- sed -i "s/TENTACLE_USER=\"pandora\"/TENTACLE_USER=\"$REBRANDING\"/g" $CI_PROJECT_DIR/pandora_server/util/tentacle_serverd
|
||||
- docker pull pandorafms/pandorafms-base:rocky8.5
|
||||
- docker run --rm -e REBRANDING="$REBRANDING" -h pandorafms -t -v "$CI_PROJECT_DIR:/tmp/pandorafms" pandorafms/pandorafms-base:rocky8.5 /tmp/pandorafms/tests/test.sh
|
||||
- docker run --ulimit nofile=262144:262144 --rm -e REBRANDING="$REBRANDING" -h pandorafms -t -v "$CI_PROJECT_DIR:/tmp/pandorafms" pandorafms/pandorafms-base:rocky8.5 /tmp/pandorafms/tests/test.sh
|
||||
|
||||
test_php_legacy:
|
||||
stage: test
|
||||
@ -22,4 +22,4 @@ test_php_legacy:
|
||||
- df -h | grep instaladores | awk '{print $NF}' |xargs umount >/dev/null 2>&1 || true
|
||||
script:
|
||||
- docker pull pandorafms/pandorafms-base:centos7
|
||||
- docker run --rm -h pandorafms -t -v "$CI_PROJECT_DIR:/tmp/pandorafms" pandorafms/pandorafms-base:centos7 /tmp/pandorafms/tests/test_legacy.sh
|
||||
- docker run --ulimit nofile=262144:262144 --rm -h pandorafms -t -v "$CI_PROJECT_DIR:/tmp/pandorafms" pandorafms/pandorafms-base:centos7 /tmp/pandorafms/tests/test_legacy.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.761-220412
|
||||
Version: 7.0NG.761-220420
|
||||
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.761-220412"
|
||||
pandora_version="7.0NG.761-220420"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
@ -1015,7 +1015,7 @@ my $Sem = undef;
|
||||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.761';
|
||||
use constant AGENT_BUILD => '220412';
|
||||
use constant AGENT_BUILD => '220420';
|
||||
|
||||
# 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.761
|
||||
%define release 220412
|
||||
%define release 220420
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.761
|
||||
%define release 220412
|
||||
%define release 220420
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -10,7 +10,7 @@
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.761"
|
||||
PI_BUILD="220412"
|
||||
PI_BUILD="220420"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
||||
{}
|
||||
|
||||
Version
|
||||
{220412}
|
||||
{220420}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
||||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.761 Build 220412")
|
||||
#define PANDORA_VERSION ("7.0NG.761 Build 220420")
|
||||
|
||||
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.761(Build 220412))"
|
||||
VALUE "ProductVersion", "(7.0NG.761(Build 220420))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-console
|
||||
Version: 7.0NG.761-220412
|
||||
Version: 7.0NG.761-220420
|
||||
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.761-220412"
|
||||
pandora_version="7.0NG.761-220420"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
@ -14,15 +14,15 @@
|
||||
},
|
||||
"require": {
|
||||
"mpdf/mpdf": "^8.0.15",
|
||||
"swiftmailer/swiftmailer": "^6.0",
|
||||
"articapfms/update_manager_client": "^1.0"
|
||||
"swiftmailer/swiftmailer": "^6.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Models\\": "include/rest-api/models",
|
||||
"Enterprise\\Models\\": "enterprise/include/rest-api/models",
|
||||
"PandoraFMS\\": "include/lib",
|
||||
"PandoraFMS\\Enterprise\\": "enterprise/include/lib"
|
||||
"PandoraFMS\\Enterprise\\": "enterprise/include/lib",
|
||||
"UpdateManager\\": "update_manager_client/lib/UpdateManager"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
|
48
pandora_console/composer.lock
generated
@ -4,52 +4,8 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "7e418bc34d1e2620c04c608499bc669d",
|
||||
"content-hash": "1ca1e8936d9ffb13f23a5b5cefbf02ad",
|
||||
"packages": [
|
||||
{
|
||||
"name": "articapfms/update_manager_client",
|
||||
"version": "v1.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/articaST/updatemanager.git",
|
||||
"reference": "f9dfed615a571311f54370a2e6a045ed0559b95b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/articaST/updatemanager/zipball/f9dfed615a571311f54370a2e6a045ed0559b95b",
|
||||
"reference": "f9dfed615a571311f54370a2e6a045ed0559b95b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.5.14",
|
||||
"squizlabs/php_codesniffer": "^3.6"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"UpdateManager\\": "lib/UpdateManager"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"GPL-2.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "fbsanchez",
|
||||
"email": "fborja.sanchez@pandorafms.com"
|
||||
}
|
||||
],
|
||||
"description": "Artica PFMS Update Manager Client",
|
||||
"support": {
|
||||
"issues": "https://github.com/articaST/updatemanager/issues",
|
||||
"source": "https://github.com/articaST/updatemanager/tree/v1.0.2"
|
||||
},
|
||||
"time": "2022-03-29T17:09:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/lexer",
|
||||
"version": "1.2.2",
|
||||
@ -997,5 +953,5 @@
|
||||
"platform-overrides": {
|
||||
"php": "7.2.0"
|
||||
},
|
||||
"plugin-api-version": "2.2.0"
|
||||
"plugin-api-version": "2.3.0"
|
||||
}
|
||||
|
@ -198,6 +198,136 @@ if (is_ajax()) {
|
||||
true
|
||||
);
|
||||
$table->data['ldap_admin_pass'] = $row;
|
||||
|
||||
// Enable/disable secondary ldap.
|
||||
// Set default value.
|
||||
set_unless_defined($config['secondary_ldap_enabled'], false);
|
||||
|
||||
$row = [];
|
||||
$row['name'] = __('Enable secondary LDAP');
|
||||
$row['control'] .= html_print_checkbox_switch(
|
||||
'secondary_ldap_enabled',
|
||||
1,
|
||||
$config['secondary_ldap_enabled'],
|
||||
true,
|
||||
false,
|
||||
'showAndHide()'
|
||||
);
|
||||
|
||||
$table->data['secondary_ldap_enabled'] = $row;
|
||||
$row = [];
|
||||
|
||||
// LDAP server.
|
||||
$row = [];
|
||||
$row['name'] = __('Secondary LDAP server');
|
||||
$row['control'] = html_print_input_text(
|
||||
'ldap_server_secondary',
|
||||
$config['ldap_server_secondary'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
);
|
||||
$table->data['ldap_server_secondary'] = $row;
|
||||
|
||||
// LDAP port.
|
||||
$row = [];
|
||||
$row['name'] = __('Secondary LDAP port');
|
||||
$row['control'] = html_print_input_text(
|
||||
'ldap_port_secondary',
|
||||
$config['ldap_port_secondary'],
|
||||
'',
|
||||
10,
|
||||
100,
|
||||
true
|
||||
);
|
||||
$table->data['ldap_port_secondary'] = $row;
|
||||
|
||||
// LDAP version.
|
||||
$ldap_versions = [
|
||||
1 => 'LDAPv1',
|
||||
2 => 'LDAPv2',
|
||||
3 => 'LDAPv3',
|
||||
];
|
||||
$row = [];
|
||||
$row['name'] = __('Secondary LDAP version');
|
||||
$row['control'] = html_print_select(
|
||||
$ldap_versions,
|
||||
'ldap_version_secondary',
|
||||
$config['ldap_version_secondary'],
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
);
|
||||
$table->data['ldap_version_secondary'] = $row;
|
||||
|
||||
// Start TLS.
|
||||
$row = [];
|
||||
$row['name'] = __('Secondary start TLS');
|
||||
$row['control'] = html_print_checkbox_switch(
|
||||
'ldap_start_tls_secondary',
|
||||
1,
|
||||
$config['ldap_start_tls_secondary'],
|
||||
true
|
||||
);
|
||||
$table->data['ldap_start_tls_secondary'] = $row;
|
||||
|
||||
// Base DN.
|
||||
$row = [];
|
||||
$row['name'] = __('Secondary Base DN');
|
||||
$row['control'] = html_print_input_text(
|
||||
'ldap_base_dn_secondary',
|
||||
$config['ldap_base_dn_secondary'],
|
||||
'',
|
||||
60,
|
||||
100,
|
||||
true
|
||||
);
|
||||
$table->data['ldap_base_dn_secondary'] = $row;
|
||||
|
||||
// Login attribute.
|
||||
$row = [];
|
||||
$row['name'] = __('Secondary Login attribute');
|
||||
$row['control'] = html_print_input_text(
|
||||
'ldap_login_attr_secondary',
|
||||
$config['ldap_login_attr_secondary'],
|
||||
'',
|
||||
60,
|
||||
100,
|
||||
true
|
||||
);
|
||||
$table->data['ldap_login_attr_secondary'] = $row;
|
||||
|
||||
// Admin LDAP login.
|
||||
$row = [];
|
||||
$row['name'] = __('Admin secondary LDAP login');
|
||||
$row['control'] = html_print_input_text(
|
||||
'ldap_admin_login_secondary',
|
||||
$config['ldap_admin_login_secondary'],
|
||||
'',
|
||||
60,
|
||||
100,
|
||||
true
|
||||
);
|
||||
$table->data['ldap_admin_login_secondary'] = $row;
|
||||
|
||||
// Admin LDAP password.
|
||||
$row = [];
|
||||
$row['name'] = __('Admin secondary LDAP password');
|
||||
$row['control'] = html_print_input_password(
|
||||
'ldap_admin_pass_secondary',
|
||||
io_output_password($config['ldap_admin_pass_secondary']),
|
||||
$alt = '',
|
||||
60,
|
||||
100,
|
||||
true
|
||||
);
|
||||
$row['control'] .= ui_print_reveal_password(
|
||||
'ldap_admin_pass_secondary',
|
||||
true
|
||||
);
|
||||
$table->data['ldap_admin_pass_secondary'] = $row;
|
||||
break;
|
||||
|
||||
case 'pandora':
|
||||
@ -354,6 +484,12 @@ echo '</form>';
|
||||
} else {
|
||||
$('#table1-2FA_all_users').hide();
|
||||
}
|
||||
|
||||
if ($('input[type=checkbox][name=secondary_ldap_enabled]:checked').val() == 1) {
|
||||
$("tr[id*='ldap_'][id$='_secondary']").show();
|
||||
} else {
|
||||
$( "tr[id*='ldap_'][id$='_secondary']" ).hide();
|
||||
}
|
||||
}
|
||||
$( document ).ready(function() {
|
||||
|
||||
@ -370,6 +506,7 @@ echo '</form>';
|
||||
success: function(data) {
|
||||
$('.table_result_auth').remove();
|
||||
$('#table_auth_result').append(data);
|
||||
showAndHide();
|
||||
}
|
||||
});
|
||||
}).change();
|
||||
|
@ -59,6 +59,9 @@ $license = db_get_value(
|
||||
'customer_key'
|
||||
);
|
||||
|
||||
if (isset($config['lts_updates']) === false) {
|
||||
$config['lts_updates'] = false;
|
||||
}
|
||||
|
||||
if (empty($license) === true) {
|
||||
$license = 'PANDORA-FREE';
|
||||
@ -285,7 +288,7 @@ $homedir = sys_get_temp_dir();
|
||||
$dbconnection = null;
|
||||
$remote_config = null;
|
||||
$insecure = false;
|
||||
$pandora_url = ui_get_full_url('/', false, false, false);
|
||||
$pandora_url = ui_get_full_url('update_manager_client/', false, false, false);
|
||||
|
||||
if (is_array($config) === true) {
|
||||
$allowOfflinePatches = false;
|
||||
@ -417,8 +420,7 @@ $ui = new Manager(
|
||||
register_upgrade($version, $type, $mode);
|
||||
},
|
||||
],
|
||||
$mode,
|
||||
true
|
||||
$mode
|
||||
);
|
||||
|
||||
$ui->run();
|
||||
|
@ -101,18 +101,30 @@ function process_user_login($login, $pass, $api=false)
|
||||
}
|
||||
|
||||
// 2. Try local.
|
||||
if ($login_remote === false
|
||||
&& ($config['fallback_local_auth']
|
||||
|| is_user_admin($login)
|
||||
|| $local_user === true
|
||||
|| strtolower($config['auth']) == 'mysql')
|
||||
) {
|
||||
return process_user_login_local($login, $pass, $api);
|
||||
if ($login_remote === false) {
|
||||
if ($api === true) {
|
||||
$user_not_login = db_get_value(
|
||||
'not_login',
|
||||
'tusuario',
|
||||
'id_user',
|
||||
$login
|
||||
);
|
||||
}
|
||||
|
||||
if ($config['fallback_local_auth']
|
||||
|| is_user_admin($login)
|
||||
|| $local_user === true
|
||||
|| strtolower($config['auth']) == 'mysql'
|
||||
|| (bool) $user_not_login === true
|
||||
) {
|
||||
return process_user_login_local($login, $pass, $api);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return $login_remote;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -227,6 +239,10 @@ function process_user_login_remote($login, $pass, $api=false)
|
||||
// LDAP
|
||||
case 'ldap':
|
||||
$sr = ldap_process_user_login($login, $pass);
|
||||
// Try with secondary server if not login.
|
||||
if ($sr === false && (bool) $config['secondary_ldap_enabled'] === true) {
|
||||
$sr = ldap_process_user_login($login, $pass, true);
|
||||
}
|
||||
|
||||
if (!$sr) {
|
||||
return false;
|
||||
@ -742,7 +758,7 @@ function update_user($id_user, $values)
|
||||
*
|
||||
* @return boolean True if the login is correct, false in other case
|
||||
*/
|
||||
function ldap_process_user_login($login, $password)
|
||||
function ldap_process_user_login($login, $password, $secondary_server=false)
|
||||
{
|
||||
global $config;
|
||||
|
||||
@ -752,14 +768,29 @@ function ldap_process_user_login($login, $password)
|
||||
return false;
|
||||
}
|
||||
|
||||
$ldap_tokens = [
|
||||
'ldap_server',
|
||||
'ldap_port',
|
||||
'ldap_version',
|
||||
'ldap_base_dn',
|
||||
'ldap_login_attr',
|
||||
'ldap_admin_login',
|
||||
'ldap_admin_pass',
|
||||
'ldap_start_tls',
|
||||
];
|
||||
|
||||
foreach ($ldap_tokens as $token) {
|
||||
$ldap[$token] = $secondary_server === true ? $config[$token.'_secondary'] : $config[$token];
|
||||
}
|
||||
|
||||
// Connect to the LDAP server
|
||||
if (stripos($config['ldap_server'], 'ldap://') !== false
|
||||
|| stripos($config['ldap_server'], 'ldaps://') !== false
|
||||
|| stripos($config['ldap_server'], 'ldapi://') !== false
|
||||
if (stripos($ldap['ldap_server'], 'ldap://') !== false
|
||||
|| stripos($ldap['ldap_server'], 'ldaps://') !== false
|
||||
|| stripos($ldap['ldap_server'], 'ldapi://') !== false
|
||||
) {
|
||||
$ds = @ldap_connect($config['ldap_server'].':'.$config['ldap_port']);
|
||||
$ds = @ldap_connect($ldap['ldap_server'].':'.$ldap['ldap_port']);
|
||||
} else {
|
||||
$ds = @ldap_connect($config['ldap_server'], $config['ldap_port']);
|
||||
$ds = @ldap_connect($ldap['ldap_server'], $ldap['ldap_port']);
|
||||
}
|
||||
|
||||
if (!$ds) {
|
||||
@ -769,9 +800,9 @@ function ldap_process_user_login($login, $password)
|
||||
}
|
||||
|
||||
// Set the LDAP version
|
||||
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, $config['ldap_version']);
|
||||
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, $ldap['ldap_version']);
|
||||
|
||||
if ($config['ldap_start_tls']) {
|
||||
if ($ldap['ldap_start_tls']) {
|
||||
if (!@ldap_start_tls($ds)) {
|
||||
$config['auth_error'] = 'Could not start TLS for LDAP connection';
|
||||
@ldap_close($ds);
|
||||
@ -782,20 +813,21 @@ function ldap_process_user_login($login, $password)
|
||||
|
||||
if ($config['ldap_function'] == 'local') {
|
||||
$sr = local_ldap_search(
|
||||
$config['ldap_server'],
|
||||
$config['ldap_port'],
|
||||
$config['ldap_version'],
|
||||
io_safe_output($config['ldap_base_dn']),
|
||||
$config['ldap_login_attr'],
|
||||
io_safe_output($config['ldap_admin_login']),
|
||||
io_output_password($config['ldap_admin_pass']),
|
||||
io_safe_output($login)
|
||||
$ldap['ldap_server'],
|
||||
$ldap['ldap_port'],
|
||||
$ldap['ldap_version'],
|
||||
io_safe_output($ldap['ldap_base_dn']),
|
||||
$ldap['ldap_login_attr'],
|
||||
io_safe_output($ldap['ldap_admin_login']),
|
||||
io_output_password($ldap['ldap_admin_pass']),
|
||||
io_safe_output($login),
|
||||
$ldap['ldap_start_tls']
|
||||
);
|
||||
|
||||
if ($sr) {
|
||||
$user_dn = $sr['dn'][0];
|
||||
|
||||
$ldap_base_dn = !empty($config['ldap_base_dn']) ? ','.io_safe_output($config['ldap_base_dn']) : '';
|
||||
$ldap_base_dn = !empty($ldap['ldap_base_dn']) ? ','.io_safe_output($ldap['ldap_base_dn']) : '';
|
||||
|
||||
if (!empty($ldap_base_dn)) {
|
||||
if (strlen($password) != 0 && @ldap_bind($ds, io_safe_output($user_dn), $password)) {
|
||||
@ -811,17 +843,17 @@ function ldap_process_user_login($login, $password)
|
||||
}
|
||||
} else {
|
||||
// PHP LDAP function
|
||||
if ($config['ldap_admin_login'] != '' && $config['ldap_admin_pass'] != '') {
|
||||
if (!@ldap_bind($ds, io_safe_output($config['ldap_admin_login']), io_output_password($config['ldap_admin_pass']))) {
|
||||
if ($ldap['ldap_admin_login'] != '' && $ldap['ldap_admin_pass'] != '') {
|
||||
if (!@ldap_bind($ds, io_safe_output($ldap['ldap_admin_login']), io_output_password($ldap['ldap_admin_pass']))) {
|
||||
$config['auth_error'] = 'Admin ldap connection fail';
|
||||
@ldap_close($ds);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$filter = '('.$config['ldap_login_attr'].'='.io_safe_output($login).')';
|
||||
$filter = '('.$ldap['ldap_login_attr'].'='.io_safe_output($login).')';
|
||||
|
||||
$sr = ldap_search($ds, io_safe_output($config['ldap_base_dn']), $filter);
|
||||
$sr = ldap_search($ds, io_safe_output($ldap['ldap_base_dn']), $filter);
|
||||
|
||||
$memberof = ldap_get_entries($ds, $sr);
|
||||
|
||||
@ -833,7 +865,7 @@ function ldap_process_user_login($login, $password)
|
||||
}
|
||||
|
||||
unset($memberof['count']);
|
||||
$ldap_base_dn = !empty($config['ldap_base_dn']) ? ','.io_safe_output($config['ldap_base_dn']) : '';
|
||||
$ldap_base_dn = !empty($ldap['ldap_base_dn']) ? ','.io_safe_output($ldap['ldap_base_dn']) : '';
|
||||
|
||||
if (!empty($ldap_base_dn)) {
|
||||
if (strlen($password) != 0 && @ldap_bind($ds, io_safe_output($memberof['dn']), $password)) {
|
||||
@ -1397,7 +1429,8 @@ function local_ldap_search(
|
||||
$access_attr=null,
|
||||
$ldap_admin_user=null,
|
||||
$ldap_admin_pass=null,
|
||||
$user=null
|
||||
$user=null,
|
||||
$ldap_start_tls=null
|
||||
) {
|
||||
global $config;
|
||||
|
||||
@ -1407,7 +1440,7 @@ function local_ldap_search(
|
||||
}
|
||||
|
||||
$tls = '';
|
||||
if ($config['ldap_start_tls']) {
|
||||
if ($ldap_start_tls) {
|
||||
$tls = ' -ZZ ';
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC220412';
|
||||
$build_version = 'PC220420';
|
||||
$pandora_version = 'v7.0NG.761';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
@ -1159,7 +1159,13 @@ function alerts_create_alert_agent_module($id_agent_module, $id_alert_template,
|
||||
$values['id_alert_template'] = (int) $id_alert_template;
|
||||
$values['last_reference'] = time();
|
||||
|
||||
return @db_process_sql_insert('talert_template_modules', $values);
|
||||
$sql = sprintf(
|
||||
'INSERT IGNORE INTO talert_template_modules(%s) VALUES(%s)',
|
||||
implode(', ', array_keys($values)),
|
||||
implode(', ', array_values($values))
|
||||
);
|
||||
|
||||
return @db_process_sql($sql);
|
||||
}
|
||||
|
||||
|
||||
|
@ -632,6 +632,38 @@ function config_update_config()
|
||||
$error_update[] = __('Admin LDAP password');
|
||||
}
|
||||
|
||||
if (config_update_value('ldap_server_secondary', get_parameter('ldap_server_secondary'), true) === false) {
|
||||
$error_update[] = __('Secondary LDAP server');
|
||||
}
|
||||
|
||||
if (config_update_value('ldap_port_secondary', get_parameter('ldap_port_secondary'), true) === false) {
|
||||
$error_update[] = __('Secondary LDAP port');
|
||||
}
|
||||
|
||||
if (config_update_value('ldap_version_secondary', get_parameter('ldap_version_secondary'), true) === false) {
|
||||
$error_update[] = __('Secondary LDAP version');
|
||||
}
|
||||
|
||||
if (config_update_value('ldap_start_tls_secondary', get_parameter('ldap_start_tls_secondary'), true) === false) {
|
||||
$error_update[] = __('Secontary start TLS');
|
||||
}
|
||||
|
||||
if (config_update_value('ldap_base_dn_secondary', get_parameter('ldap_base_dn_secondary'), true) === false) {
|
||||
$error_update[] = __('Secondary base DN');
|
||||
}
|
||||
|
||||
if (config_update_value('ldap_login_attr_secondary', get_parameter('ldap_login_attr_secondary'), true) === false) {
|
||||
$error_update[] = __('Secondary login attribute');
|
||||
}
|
||||
|
||||
if (config_update_value('ldap_admin_login_secondary', get_parameter('ldap_admin_login_secondary'), true) === false) {
|
||||
$error_update[] = __('Admin secondary LDAP login');
|
||||
}
|
||||
|
||||
if (config_update_value('ldap_admin_pass_secondary', io_input_password(io_safe_output(get_parameter('ldap_admin_pass_secondary'))), true) === false) {
|
||||
$error_update[] = __('Admin secondary LDAP password');
|
||||
}
|
||||
|
||||
if (config_update_value('fallback_local_auth', get_parameter('fallback_local_auth'), true) === false) {
|
||||
$error_update[] = __('Fallback to local authentication');
|
||||
}
|
||||
@ -656,6 +688,10 @@ function config_update_config()
|
||||
$error_update[] = __('Save profile');
|
||||
}
|
||||
|
||||
if (config_update_value('secondary_ldap_enabled', get_parameter('secondary_ldap_enabled'), true) === false) {
|
||||
$error_update[] = __('LDAP secondary enabled');
|
||||
}
|
||||
|
||||
if (config_update_value('rpandora_server', get_parameter('rpandora_server'), true) === false) {
|
||||
$error_update[] = __('MySQL host');
|
||||
}
|
||||
@ -2628,6 +2664,41 @@ function config_process_config()
|
||||
config_update_value('ldap_admin_pass', '');
|
||||
}
|
||||
|
||||
if (!isset($config['ldap_server_secondary'])) {
|
||||
config_update_value('ldap_server_secondary', 'localhost');
|
||||
}
|
||||
|
||||
if (!isset($config['ldap_port_secondary'])) {
|
||||
config_update_value('ldap_port_secondary', 389);
|
||||
}
|
||||
|
||||
if (!isset($config['ldap_version_secondary'])) {
|
||||
config_update_value('ldap_version_secondary', '3');
|
||||
}
|
||||
|
||||
if (!isset($config['ldap_start_tls_secondary'])) {
|
||||
config_update_value('ldap_start_tls_secondary', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['ldap_base_dn_secondary'])) {
|
||||
config_update_value(
|
||||
'ldap_base_dn_secondary',
|
||||
'ou=People,dc=edu,dc=example,dc=org'
|
||||
);
|
||||
}
|
||||
|
||||
if (!isset($config['ldap_login_attr_secondary'])) {
|
||||
config_update_value('ldap_login_attr_secondary', 'uid');
|
||||
}
|
||||
|
||||
if (!isset($config['ldap_admin_login_secondary'])) {
|
||||
config_update_value('ldap_admin_login_secondary', '');
|
||||
}
|
||||
|
||||
if (!isset($config['ldap_admin_pass_secondary'])) {
|
||||
config_update_value('ldap_admin_pass_secondary', '');
|
||||
}
|
||||
|
||||
if (!isset($config['ldap_function'])) {
|
||||
config_update_value('ldap_function', 'local');
|
||||
}
|
||||
|
@ -1361,7 +1361,8 @@ function defineTinyMCE(added_config) {
|
||||
element_format: "html",
|
||||
object_resizing: true,
|
||||
autoresize_bottom_margin: 50,
|
||||
autoresize_on_init: true
|
||||
autoresize_on_init: true,
|
||||
extended_valid_elements: "img[*]"
|
||||
});
|
||||
|
||||
if (!isEmptyObject(added_config)) {
|
||||
|
@ -129,7 +129,7 @@
|
||||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.761';
|
||||
$build = '220412';
|
||||
$build = '220420';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.761
|
||||
%define release 220412
|
||||
%define release 220420
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.761
|
||||
%define release 220412
|
||||
%define release 220420
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.761
|
||||
%define release 220412
|
||||
%define release 220420
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
@ -4,14 +4,13 @@
|
||||
|
||||
This library is the client side of the Update Manager project from Artica PFMS.
|
||||
|
||||
Allows update files in *on-premise* PHP projects and apply database upgrades on them.
|
||||
|
||||
Allows update files in _on-premise_ PHP projects and apply database upgrades on them.
|
||||
|
||||
## How to use
|
||||
|
||||
Update manager client allows package updates in OUM format.
|
||||
|
||||
This OUM packages are *zip* files.
|
||||
This OUM packages are _zip_ files.
|
||||
|
||||
To generate an update pack you should zip all files in the way you want them to be in your installation:
|
||||
|
||||
@ -35,32 +34,28 @@ $ cd update_package && zip -r update_package_1.oum ./
|
||||
|
||||
```
|
||||
|
||||
|
||||
Create a file to handle updates with following content
|
||||
|
||||
|
||||
```php
|
||||
<?php
|
||||
/**
|
||||
* Sample file to perform offline updates.
|
||||
*/
|
||||
|
||||
require_once 'vendor/autoload.php';
|
||||
require_once "vendor/autoload.php";
|
||||
use UpdateManager\UI\Manager;
|
||||
|
||||
$umc = new Manager(
|
||||
// Whatever is placed in url after host name.
|
||||
public_url: '/',
|
||||
settings: [
|
||||
'homedir' => __DIR__,
|
||||
'allowOfflinePatches' => true,
|
||||
],
|
||||
mode: Manager::MODE_OFFLINE,
|
||||
composer: true
|
||||
// Whatever is placed in url after host name.
|
||||
public_url: "/",
|
||||
settings: [
|
||||
"homedir" => __DIR__,
|
||||
"allowOfflinePatches" => true,
|
||||
],
|
||||
mode: Manager::MODE_OFFLINE,
|
||||
composer: true
|
||||
);
|
||||
$umc->run();
|
||||
|
||||
|
||||
```
|
||||
|
||||
By accessing the file via URL, you can use the offline updater:
|
||||
@ -71,8 +66,7 @@ Press the green area to start the update.
|
||||
|
||||
You will receive a summary of the installation process.
|
||||
|
||||
If success, then files and folders will be recreated under *homedir* path.
|
||||
|
||||
If success, then files and folders will be recreated under _homedir_ path.
|
||||
|
||||
### Links
|
||||
|
||||
@ -80,7 +74,4 @@ More information:
|
||||
|
||||
https://pandorafms.com/manual/en/documentation/02_installation/02_anexo_upgrade?s[]=update&s[]=manager#automatic_update_with_update_manager
|
||||
|
||||
|
||||
https://pandorafms.com/en/
|
||||
|
||||
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 284 B After Width: | Height: | Size: 284 B |
Before Width: | Height: | Size: 733 B After Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 432 B After Width: | Height: | Size: 432 B |
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 120 B After Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 105 B |
Before Width: | Height: | Size: 111 B After Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 110 B After Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 119 B After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 90 B |
Before Width: | Height: | Size: 101 B After Width: | Height: | Size: 101 B |
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 129 B |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 408 KiB After Width: | Height: | Size: 408 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 450 KiB After Width: | Height: | Size: 450 KiB |
@ -10,16 +10,15 @@ namespace UpdateManager;
|
||||
require_once __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
// Load Config class from updatemanager project to read test.ini settings.
|
||||
|
||||
// Embeebed mode.
|
||||
@include_once __DIR__.'/../../src/lib/Config.php';
|
||||
@include_once __DIR__.'/../../src/lib/License.php';
|
||||
@include_once __DIR__.'/../../src/lib/DB.php';
|
||||
@require_once __DIR__.'/../../src/lib/Config.php';
|
||||
@require_once __DIR__.'/../../src/lib/License.php';
|
||||
@require_once __DIR__.'/../../src/lib/DB.php';
|
||||
|
||||
// Referenced mode.
|
||||
@include_once __DIR__.'/../../updatemanager/src/lib/Config.php';
|
||||
@include_once __DIR__.'/../../updatemanager/src/lib/License.php';
|
||||
@include_once __DIR__.'/../../updatemanager/src/lib/DB.php';
|
||||
@require_once __DIR__.'/../../updatemanager/src/lib/Config.php';
|
||||
@require_once __DIR__.'/../../updatemanager/src/lib/License.php';
|
||||
@require_once __DIR__.'/../../updatemanager/src/lib/DB.php';
|
||||
|
||||
/**
|
||||
* Test the Client class.
|
||||
@ -69,7 +68,7 @@ class ClientTest extends \PHPUnit\Framework\TestCase
|
||||
|
||||
if ($online === true) {
|
||||
$target = '/var/www/html/updatemanager/repo/test';
|
||||
} elseif (substr($target, 0, 1) !== '/') {
|
||||
} else if (substr($target, 0, 1) !== '/') {
|
||||
$target = __DIR__.'/../../'.$target;
|
||||
}
|
||||
|
||||
@ -562,4 +561,6 @@ class ClientTest extends \PHPUnit\Framework\TestCase
|
||||
// Cleanup.
|
||||
$umc_enterprise->getDBH()->query('DROP DATABASE `ent`');
|
||||
}
|
||||
|
||||
|
||||
}
|