#35 Always follows aliases if "deref always" is set in ldap.conf

v2.4-pre2
closed-out-of-date
nobody
5
2012-10-01
2009-06-09
No

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.

Discussion

  • Helmar Gerloni

    Helmar Gerloni - 2009-06-09

    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.

     
  • phobie

    phobie - 2012-10-01
    • status: open --> closed-out-of-date
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks