Revision: 2202
http://mrbs.svn.sourceforge.net/mrbs/?rev=2202&view=rev
Author: jberanek
Date: 2011-12-17 20:05:28 +0000 (Sat, 17 Dec 2011)
Log Message:
-----------
* Added option to auth_ldap to disable client referrals. Provided by
Daniel Yule.
Modified Paths:
--------------
mrbs/trunk/web/auth_ldap.inc
mrbs/trunk/web/systemdefaults.inc.php
Modified: mrbs/trunk/web/auth_ldap.inc
===================================================================
--- mrbs/trunk/web/auth_ldap.inc 2011-12-16 19:02:05 UTC (rev 2201)
+++ mrbs/trunk/web/auth_ldap.inc 2011-12-17 20:05:28 UTC (rev 2202)
@@ -39,6 +39,7 @@
global $ldap_group_member_attrib;
global $ldap_admin_group_dn;
global $ldap_email_attrib;
+ global $ldap_disable_referrals;
if (!function_exists("ldap_connect"))
{
@@ -62,7 +63,8 @@
'ldap_admin_group_dn',
'ldap_v3',
'ldap_tls',
- 'ldap_email_attrib'
+ 'ldap_email_attrib',
+ 'ldap_disable_referrals'
);
$all_ldap_opts = array();
@@ -140,7 +142,12 @@
{
ldap_start_tls($ldap);
}
-
+ if(isset($all_ldap_opts['ldap_disable_referrals'][$idx]) &&
$all_ldap_opts['ldap_disable_referrals'][$idx])
+ {
+ // Required to do a search on Active Directory for Win 2003+
+ ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
+ }
+
if (isset($all_ldap_opts['ldap_dn_search_attrib'][$idx]))
{
if (isset($all_ldap_opts['ldap_dn_search_dn'][$idx]) &&
Modified: mrbs/trunk/web/systemdefaults.inc.php
===================================================================
--- mrbs/trunk/web/systemdefaults.inc.php 2011-12-16 19:02:05 UTC (rev
2201)
+++ mrbs/trunk/web/systemdefaults.inc.php 2011-12-17 20:05:28 UTC (rev
2202)
@@ -660,6 +660,10 @@
// An example for Microsoft AD:
//$ldap_filter = "memberof=cn=whater,ou=whatver,dc=example,dc=com";
+// If you need to disable client referrals, this should be set to TRUE.
+// Note: Active Directory for Windows 2003 forward requires this.
+// $ldap_disable_referrals = TRUE;
+
// 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;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn Windows Azure Live! Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for
developers. It will provide a great way to learn Windows Azure and what it
provides. You can attend the event by watching it streamed LIVE online.
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits