Changeset:
        fda14c6e06f7
        
https://sourceforge.net/p/mrbs/hg-code/ci/fda14c6e06f797d38aad481d9e84abbd466ef48d
Author:
        John Beranek <[email protected]>
Date:
        Tue Sep 15 21:24:31 2015 +0100
Log message:

auth_ldap: Added support for LDAP dereferencing behaviour, based on
[patches:#56].

diffstat:

 web/auth/auth_ldap.inc     |  8 +++++++-
 web/systemdefaults.inc.php |  8 ++++++++
 2 files changed, 15 insertions(+), 1 deletions(-)

diffs (50 lines):

diff -r 3fc5d5fe3ac5 -r fda14c6e06f7 web/auth/auth_ldap.inc
--- a/web/auth/auth_ldap.inc    Fri Sep 11 09:53:12 2015 +0100
+++ b/web/auth/auth_ldap.inc    Tue Sep 15 21:24:31 2015 +0100
@@ -40,6 +40,7 @@
   global $ldap_admin_group_dn;
   global $ldap_email_attrib;
   global $ldap_disable_referrals;
+  global $ldap_deref;
 
   if (!function_exists("ldap_connect"))
   {
@@ -64,7 +65,8 @@
                         'ldap_v3',
                         'ldap_tls',
                         'ldap_email_attrib',
-                        'ldap_disable_referrals'
+                        'ldap_disable_referrals',
+                        'ldap_deref'
                        );
 
   $all_ldap_opts = array();
@@ -136,6 +138,10 @@
     {
       authLdapDebug("authLdapAction: Got LDAP connection");
 
+      if (isset($all_ldap_opts['ldap_deref'][$idx]))
+      {
+        ldap_set_option($ldap, LDAP_OPT_DEREF, 
$all_ldap_opts['ldap_deref'][$idx]);
+      }
       if (isset($all_ldap_opts['ldap_v3'][$idx]) &&
           $all_ldap_opts['ldap_v3'][$idx])
       {
diff -r 3fc5d5fe3ac5 -r fda14c6e06f7 web/systemdefaults.inc.php
--- a/web/systemdefaults.inc.php        Fri Sep 11 09:53:12 2015 +0100
+++ b/web/systemdefaults.inc.php        Tue Sep 15 21:24:31 2015 +0100
@@ -786,6 +786,14 @@
 // Note: Active Directory for Windows 2003 forward requires this.
 // $ldap_disable_referrals = TRUE;
 
+// LDAP option for dereferencing aliases
+// LDAP_DEREF_NEVER = 0 - (default) aliases are never dereferenced.
+// LDAP_DEREF_SEARCHING = 1 - aliases should be dereferenced during the search
+//      but not when locating the base object of the search.
+// LDAP_DEREF_FINDING = 2 - aliases should be dereferenced when locating the 
base object but not during the search.
+// LDAP_DEREF_ALWAYS = 3 - aliases should be dereferenced always.
+//$ldap_deref = LDAP_DEREF_ALWAYS;
+
 // Set to TRUE to tell MRBS to look up a user's email address in LDAP.
 // Utilises $ldap_email_attrib below
 $ldap_get_user_email = FALSE;

------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to