Explicitly enable LDAP referrals
Note: The mock LDAP system doesn't support referrals, so we can't add a unit test for this.
This commit is contained in:
parent
7bed404302
commit
d5e70c6e2a
1 changed files with 1 additions and 0 deletions
|
@ -43,6 +43,7 @@ class LDAPConnection(object):
|
|||
def __enter__(self):
|
||||
trace_level = 2 if os.environ.get('LDAP_DEBUG') == '1' else 0
|
||||
self._conn = ldap.initialize(self._ldap_uri, trace_level=trace_level)
|
||||
self._conn.set_option(ldap.OPT_REFERRALS, 1)
|
||||
self._conn.simple_bind_s(self._user_dn, self._user_pw)
|
||||
|
||||
return self._conn
|
||||
|
|
Reference in a new issue