mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipaldap: merge simple_bind into LDAPClient
* Use LDAPClient.simple_bind instead of extra call to IPAdmin.do_simple_bind * Rename binddn to bind_dn * Rename bindpw to bind_password * Explicitly specify bind_dn in all calls https://fedorahosted.org/freeipa/ticket/6461 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
5760b7e983
commit
de58a5c605
@@ -49,7 +49,7 @@ def bind(ldap_uri, base_dn, username, password):
|
||||
bind_dn = DN(('uid', username), ('cn', 'users'), ('cn', 'accounts'), base_dn)
|
||||
try:
|
||||
conn = IPAdmin(ldap_uri=ldap_uri)
|
||||
conn.do_simple_bind(bind_dn, password)
|
||||
conn.simple_bind(bind_dn, password)
|
||||
except (errors.ACIError, errors.DatabaseError, errors.NotFound) as e:
|
||||
root_logger.error(
|
||||
'migration invalid credentials for %s: %s' % (bind_dn, e))
|
||||
|
||||
Reference in New Issue
Block a user