@@ -107,24 +107,24 @@ class AuthLdap(object):
if not lobjects:
raise ldap.NO_SUCH_OBJECT()
for (dn, attrs) in lobjects:
try:
server.simple_bind_s(dn, password)
break
except ldap.INVALID_CREDENTIALS, e:
log.debug("LDAP rejected password for user '%s' (%s): %s",
uid, username, dn)
else:
log.debug("No matching LDAP objects for authentication "
"of '%s' (%s)", uid, username)
raise LdapPasswordError()
except ldap.NO_SUCH_OBJECT, e:
log.debug("LDAP says no such user '%s' (%s)", uid, username)
raise LdapUsernameError()
except ldap.SERVER_DOWN, e:
raise LdapConnectionError("LDAP can't access authentication server")
return (dn, attrs)
Status change: