diff options
| author | Ionuț Arțăriși <iartarisi@suse.cz> | 2012-06-29 13:57:42 +0200 |
|---|---|---|
| committer | Ionuț Arțăriși <iartarisi@suse.cz> | 2012-06-29 14:10:47 +0200 |
| commit | 33104d2cc27011f2e36104c21f721df36cdfd21b (patch) | |
| tree | ecf22a0175b1eaf35dd71e2923666c33e24779ff | |
| parent | 8cd73c75cec35d4df49891ee4c36102b4c8d96ff (diff) | |
don't assume that the LDAP server require authentication
Change-Id: I67f64e6eb19e7a96c0e50f99e57c7fee613df909
| -rw-r--r-- | keystone/common/ldap/core.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/keystone/common/ldap/core.py b/keystone/common/ldap/core.py index 2734ce44..b450dac4 100644 --- a/keystone/common/ldap/core.py +++ b/keystone/common/ldap/core.py @@ -107,7 +107,11 @@ class BaseLdap(object): if password is None: password = self.LDAP_PASSWORD - conn.simple_bind_s(user, password) + # not all LDAP servers require authentication, so we don't bind + # if we don't have any user/pass + if user and password: + conn.simple_bind_s(user, password) + return conn def _id_to_dn(self, id): |
