summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-01-30 06:46:48 -0500
committerMartin Kosek <mkosek@redhat.com>2013-03-01 16:59:46 +0100
commit334a0cdcdc16ac50de2be1f751262bd87d0e5e86 (patch)
tree80882ce2180354b9c2f4520791381ac9d226f027 /ipaserver
parentf7a4cceb97f829ad2e1f8853c0e4414dcebf731e (diff)
downloadfreeipa-334a0cdcdc16ac50de2be1f751262bd87d0e5e86.tar.gz
freeipa-334a0cdcdc16ac50de2be1f751262bd87d0e5e86.tar.xz
freeipa-334a0cdcdc16ac50de2be1f751262bd87d0e5e86.zip
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
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/bindinstance.py2
-rw-r--r--ipaserver/install/cainstance.py2
-rw-r--r--ipaserver/ipaldap.py11
-rw-r--r--ipaserver/plugins/ldap2.py2
4 files changed, 4 insertions, 13 deletions
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index 9c9ad6489..dff661dd6 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -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
diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
index 30f2b6bef..256479875 100644
--- a/ipaserver/install/cainstance.py
+++ b/ipaserver/install/cainstance.py
@@ -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:
diff --git a/ipaserver/ipaldap.py b/ipaserver/ipaldap.py
index e8a164064..b200d19ae 100644
--- a/ipaserver/ipaldap.py
+++ b/ipaserver/ipaldap.py
@@ -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.
diff --git a/ipaserver/plugins/ldap2.py b/ipaserver/plugins/ldap2.py
index 619e9a079..295eddd72 100644
--- a/ipaserver/plugins/ldap2.py
+++ b/ipaserver/plugins/ldap2.py
@@ -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)