Hi,
when "deref always" is set in /etc/ldap/ldap.conf Luma always dereferences aliases, regardless of the setting in the server configuration dialog. Adding the following 4 x 2 lines should cure this:
ldap3:~# diff -up /usr/lib/luma/base/backend/ObjectClassAttributeInfo.py /usr/lib/luma/base/backend/ObjectClassAttributeInfo.py.orig
--- /usr/lib/luma/base/backend/ObjectClassAttributeInfo.py 2009-06-09 19:43:20.000000000 +0200
+++ /usr/lib/luma/base/backend/ObjectClassAttributeInfo.py.orig 2009-06-09 19:29:42.000000000 +0200
@@ -595,8 +595,6 @@ class WorkerThreadFetch(threading.Thread
# Enable Alias support
if self.serverMeta.followAliases:
self.ldapServerObject.set_option(ldap.OPT_DEREF, ldap.DEREF_ALWAYS)
- else:
- self.ldapServerObject.set_option(ldap.OPT_DEREF, ldap.DEREF_NEVER)
if self.serverMeta.bindAnon:
self.ldapServerObject.simple_bind()
@@ -641,8 +639,6 @@ class WorkerThreadFetch(threading.Thread
# Enable Alias support
if self.serverMeta.followAliases:
self.ldapServerObject.set_option(ldap.OPT_DEREF, ldap.DEREF_ALWAYS)
- else:
- self.ldapServerObject.set_option(ldap.OPT_DEREF, ldap.DEREF_NEVER)
self.ldapServerObject.sasl_interactive_bind_s("", sasl_auth)
except AttributeError, e:
ldap3:~# diff -up /usr/lib/luma/base/backend/LumaConnection.py /usr/lib/luma/base/backend/LumaConnection.py.orig
--- /usr/lib/luma/base/backend/LumaConnection.py 2009-06-09 19:41:51.000000000 +0200
+++ /usr/lib/luma/base/backend/LumaConnection.py.orig 2009-06-09 19:29:42.000000000 +0200
@@ -558,8 +558,6 @@ class WorkerThreadBind(threading.Thread)
# Enable Alias support
if self.serverMeta.followAliases:
self.ldapServerObject.set_option(ldap.OPT_DEREF, ldap.DEREF_ALWAYS)
- else:
- self.ldapServerObject.set_option(ldap.OPT_DEREF, ldap.DEREF_NEVER)
if self.serverMeta.bindAnon:
self.ldapServerObject.simple_bind()
@@ -604,8 +602,6 @@ class WorkerThreadBind(threading.Thread)
# Enable Alias support
if self.serverMeta.followAliases:
self.ldapServerObject.set_option(ldap.OPT_DEREF, ldap.DEREF_ALWAYS)
- else:
- self.ldapServerObject.set_option(ldap.OPT_DEREF, ldap.DEREF_NEVER)
self.ldapServerObject.sasl_interactive_bind_s("", sasl_auth)
except AttributeError, e:
Helmar.
LumaDerefAlways.patch
Sorry for the formatting, i thought i could edit my post after submitting ... the 2 added lines on 4 positions are "else: ...DEREF_NEVER)", see attachment.