Remove IPAdmin.simple_bind_s

Part of the work for: https://fedorahosted.org/freeipa/ticket/2660
This commit is contained in:
Petr Viktorin authored and Martin Kosek committed 2013-03-01 16:59:46 +01:00
1 parent 1ee66ffe03
commit f7a4cceb97
3 files changed
+6 -9

No files matched your search

+2 -2
View File
@@ -375,7 +375,7 @@ class CADSInstance(service.Service):
def enable_ssl(self): def enable_ssl(self):
conn = ipaldap.IPAdmin(self.fqdn, port=DEFAULT_DSPORT) conn = ipaldap.IPAdmin(self.fqdn, port=DEFAULT_DSPORT)
conn.simple_bind_s(DN(('cn', 'directory manager')), self.dm_password) conn.do_simple_bind(DN(('cn', 'directory manager')), self.dm_password)
mod = [(ldap.MOD_REPLACE, "nsSSLClientAuth", "allowed"), mod = [(ldap.MOD_REPLACE, "nsSSLClientAuth", "allowed"),
(ldap.MOD_REPLACE, "nsSSL3Ciphers", (ldap.MOD_REPLACE, "nsSSL3Ciphers",
@@ -1055,7 +1055,7 @@ class CAInstance(service.Service):
# the appropriate groups so it can issue certificates without # the appropriate groups so it can issue certificates without
# manual intervention. # manual intervention.
conn = ipaldap.IPAdmin(self.fqdn, self.ds_port) conn = ipaldap.IPAdmin(self.fqdn, self.ds_port)
conn.simple_bind_s(DN(('cn', 'Directory Manager')), self.dm_password) conn.do_simple_bind(DN(('cn', 'Directory Manager')), self.dm_password)
decoded = base64.b64decode(self.ra_cert) decoded = base64.b64decode(self.ra_cert)
+3 -2
View File
@@ -463,7 +463,8 @@ class DsInstance(service.Service):
root_logger.debug("Waiting for memberof task to complete.") root_logger.debug("Waiting for memberof task to complete.")
conn = ipaldap.IPAdmin(self.fqdn) conn = ipaldap.IPAdmin(self.fqdn)
if self.dm_password: if self.dm_password:
conn.simple_bind_s(DN(('cn', 'directory manager')), self.dm_password) conn.do_simple_bind(
DN(('cn', 'directory manager')), self.dm_password)
else: else:
conn.do_sasl_gssapi_bind() conn.do_sasl_gssapi_bind()
replication.wait_for_task(conn, dn) replication.wait_for_task(conn, dn)
@@ -557,7 +558,7 @@ class DsInstance(service.Service):
dsdb.create_pin_file() dsdb.create_pin_file()
conn = ipaldap.IPAdmin(self.fqdn) conn = ipaldap.IPAdmin(self.fqdn)
conn.simple_bind_s(DN(('cn', 'directory manager')), self.dm_password) conn.do_simple_bind(DN(('cn', 'directory manager')), self.dm_password)
mod = [(ldap.MOD_REPLACE, "nsSSLClientAuth", "allowed"), mod = [(ldap.MOD_REPLACE, "nsSSLClientAuth", "allowed"),
(ldap.MOD_REPLACE, "nsSSL3Ciphers", (ldap.MOD_REPLACE, "nsSSL3Ciphers",
+1 -5
View File
@@ -1613,7 +1613,7 @@ class IPAdmin(LDAPClient):
def do_simple_bind(self, binddn=DN(('cn', 'directory manager')), bindpw="", def do_simple_bind(self, binddn=DN(('cn', 'directory manager')), bindpw="",
timeout=DEFAULT_TIMEOUT): timeout=DEFAULT_TIMEOUT):
self.__bind_with_wait(self.simple_bind_s, timeout, binddn, bindpw) self.__bind_with_wait(self.conn.simple_bind_s, timeout, binddn, bindpw)
def do_sasl_gssapi_bind(self, timeout=DEFAULT_TIMEOUT): def do_sasl_gssapi_bind(self, timeout=DEFAULT_TIMEOUT):
self.__bind_with_wait( self.__bind_with_wait(
@@ -1716,10 +1716,6 @@ class IPAdmin(LDAPClient):
# FIXME: for backwards compatibility only # FIXME: for backwards compatibility only
return self.conn.encode(*args, **kwargs) return self.conn.encode(*args, **kwargs)
def simple_bind_s(self, *args, **kwargs):
# FIXME: for backwards compatibility only
return self.conn.simple_bind_s(*args, **kwargs)
def unbind(self, *args, **kwargs): def unbind(self, *args, **kwargs):
# FIXME: for backwards compatibility only # FIXME: for backwards compatibility only
return self.conn.unbind(*args, **kwargs) return self.conn.unbind(*args, **kwargs)