[Fusionforge-commits] FusionForge branch Branch_5_2 updated. b3c7519d10814e66598724aef1142a15763e8598
Julien HEYMAN
jheyman at fusionforge.org
Fri Feb 21 18:01:09 CET 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, Branch_5_2 has been updated
via b3c7519d10814e66598724aef1142a15763e8598 (commit)
from f75c5a7edb282e693f17e878ea81c019c2d990dd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b3c7519d10814e66598724aef1142a15763e8598
Author: Julien HEYMAN <julien.heyman at atos.net>
Date: Fri Feb 21 17:41:29 2014 +0100
[#633] Fix authldap plugin parameters
diff --git a/src/plugins/authldap/etc/authldap.ini b/src/plugins/authldap/etc/authldap.ini
index 4278612..47aac45 100644
--- a/src/plugins/authldap/etc/authldap.ini
+++ b/src/plugins/authldap/etc/authldap.ini
@@ -17,6 +17,7 @@ sync_data_on = login
; LDAP parameters
ldap_server = ldap.example.com
ldap_port = 389
+ldap_version = 3
start_tls = yes
base_dn = "ou=users,dc=example,dc=com"
sync_data_as_user = yes
diff --git a/src/plugins/authldap/include/AuthLDAPPlugin.class.php b/src/plugins/authldap/include/AuthLDAPPlugin.class.php
index c929bda..0aaec85 100644
--- a/src/plugins/authldap/include/AuthLDAPPlugin.class.php
+++ b/src/plugins/authldap/include/AuthLDAPPlugin.class.php
@@ -222,6 +222,7 @@ class AuthLDAPPlugin extends ForgeAuthPlugin {
forge_define_config_item('ldap_server', $this->name, 'ldap.example.com');
forge_define_config_item('ldap_port', $this->name, 389);
forge_define_config_item('base_dn', $this->name, 'ou=users,dc=example,dc=com');
+ forge_define_config_item('ldap_version', $this->name, 3);
forge_define_config_item('skipped_users', $this->name, '');
forge_define_config_item('manager_dn', $this->name, '');
forge_define_config_item('manager_password', $this->name, '');
@@ -237,7 +238,7 @@ class AuthLDAPPlugin extends ForgeAuthPlugin {
if (forge_get_config('manager_dn', $this->name)) {
ldap_bind($this->ldap_conn,
forge_get_config('manager_dn', $this->name),
- forge_get_config('ldap_password'));
+ forge_get_config('manager_password', $this->name));
} else {
ldap_bind($this->ldap_conn);
}
@@ -300,9 +301,9 @@ class AuthLDAPPlugin extends ForgeAuthPlugin {
$conn = ldap_connect($server);
}
- if (forge_get_config('ldap_version')) {
- debuglog("LDAP: ldap_set_option ($this->ldap_conn, LDAP_OPT_PROTOCOL_VERSION, ".forge_get_config('ldap_version').");");
- if (!ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, forge_get_config('ldap_version'))) {
+ if (forge_get_config('ldap_version', $this->name)) {
+ debuglog("LDAP: ldap_set_option ($this->ldap_conn, LDAP_OPT_PROTOCOL_VERSION, ".forge_get_config('ldap_version', $this->name).");");
+ if (!ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, forge_get_config('ldap_version', $this->name))) {
debuglog("LDAP: ldap_set_option() failed: ".ldap_error($this->ldap_conn));
return false;
}
@@ -318,7 +319,7 @@ class AuthLDAPPlugin extends ForgeAuthPlugin {
// then authentificate with the server.
if (forge_get_config('manager_dn', $this->name)) {
if (!@ldap_bind($conn, forge_get_config('manager_dn', $this->name),
- forge_get_config('ldap_password'))) {
+ forge_get_config('manager_password', $this->name))) {
error_log("LDAP application bind failed.");
return false;
}
-----------------------------------------------------------------------
Summary of changes:
src/plugins/authldap/etc/authldap.ini | 1 +
src/plugins/authldap/include/AuthLDAPPlugin.class.php | 11 ++++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
hooks/post-receive
--
FusionForge
More information about the Fusionforge-commits
mailing list