mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Remove IPAdmin.unbind_s(), keep unbind()
The unbind and unbind_s functions do the same thing (both are synchronous). In the low-level IPASimpleLDAPObject, unbind_s rather than unbind is kept. Part of the work for: https://fedorahosted.org/freeipa/ticket/2660
This commit is contained in:
committed by
Martin Kosek
parent
f7a4cceb97
commit
334a0cdcdc
@@ -190,7 +190,7 @@ def dns_container_exists(fqdn, suffix, dm_password=None, ldapi=False, realm=None
|
||||
raise RuntimeError('LDAP server on %s is not responding. Is IPA installed?' % fqdn)
|
||||
|
||||
ret = object_exists(DN(('cn', 'dns'), suffix))
|
||||
conn.unbind_s()
|
||||
conn.unbind()
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
@@ -1084,7 +1084,7 @@ class CAInstance(service.Service):
|
||||
modlist = [(0, 'uniqueMember', '%s' % entry_dn)]
|
||||
conn.modify_s(dn, modlist)
|
||||
|
||||
conn.unbind_s()
|
||||
conn.unbind()
|
||||
|
||||
def __run_certutil(self, args, database=None, pwd_file=None,stdin=None):
|
||||
if not database:
|
||||
|
||||
@@ -570,10 +570,6 @@ class IPASimpleLDAPObject(object):
|
||||
def start_tls_s(self):
|
||||
return self.conn.start_tls_s()
|
||||
|
||||
def unbind(self):
|
||||
self.flush_cached_schema()
|
||||
return self.conn.unbind()
|
||||
|
||||
def unbind_s(self):
|
||||
self.flush_cached_schema()
|
||||
return self.conn.unbind_s()
|
||||
@@ -1704,10 +1700,6 @@ class IPAdmin(LDAPClient):
|
||||
# FIXME: for backwards compatibility only
|
||||
return self.conn.modify_s(*args, **kwargs)
|
||||
|
||||
def unbind_s(self, *args, **kwargs):
|
||||
# FIXME: for backwards compatibility only
|
||||
return self.conn.unbind_s(*args, **kwargs)
|
||||
|
||||
def set_option(self, *args, **kwargs):
|
||||
# FIXME: for backwards compatibility only
|
||||
return self.conn.set_option(*args, **kwargs)
|
||||
@@ -1717,8 +1709,7 @@ class IPAdmin(LDAPClient):
|
||||
return self.conn.encode(*args, **kwargs)
|
||||
|
||||
def unbind(self, *args, **kwargs):
|
||||
# FIXME: for backwards compatibility only
|
||||
return self.conn.unbind(*args, **kwargs)
|
||||
return self.conn.unbind_s(*args, **kwargs)
|
||||
|
||||
|
||||
# FIXME: Some installer tools depend on ipaldap importing plugins.ldap2.
|
||||
|
||||
@@ -347,7 +347,7 @@ class ldap2(LDAPClient, CrudBackend):
|
||||
conn = IPASimpleLDAPObject(
|
||||
self.ldap_uri, force_schema_updates=False)
|
||||
conn.simple_bind_s(dn, old_pass)
|
||||
conn.unbind()
|
||||
conn.unbind_s()
|
||||
|
||||
with self.error_handler():
|
||||
self.conn.passwd_s(dn, old_pass, new_pass)
|
||||
|
||||
Reference in New Issue
Block a user