Installer should not connect to 127.0.0.1

IPA installer sometimes tries to connect to the Directory Server
via loopback address 127.0.0.1. However, the Directory Server on
pure IPv6 systems may not be listening on this address. This address
may not even be available.

Rather use the FQDN of the server when connecting to the DS to fix
this issue and make the connection consistent ldapmodify calls which
also use FQDN instead of IP address.

https://fedorahosted.org/freeipa/ticket/3355
This commit is contained in:
Martin Kosek 2013-01-16 10:05:43 +01:00 committed by Rob Crittenden
parent 5d919c9556
commit 51f9ed0239
2 changed files with 3 additions and 3 deletions

View File

@ -378,7 +378,7 @@ class CADSInstance(service.Service):
dsdb.create_pin_file()
def enable_ssl(self):
conn = ipaldap.IPAdmin("127.0.0.1", port=DEFAULT_DSPORT)
conn = ipaldap.IPAdmin(self.fqdn, port=DEFAULT_DSPORT)
conn.simple_bind_s(DN(('cn', 'directory manager')), self.dm_password)
mod = [(ldap.MOD_REPLACE, "nsSSLClientAuth", "allowed"),

View File

@ -463,7 +463,7 @@ class DsInstance(service.Service):
dn = DN(('cn', 'IPA install %s' % self.sub_dict["TIME"]), ('cn', 'memberof task'),
('cn', 'tasks'), ('cn', 'config'))
root_logger.debug("Waiting for memberof task to complete.")
conn = ipaldap.IPAdmin("127.0.0.1")
conn = ipaldap.IPAdmin(self.fqdn)
if self.dm_password:
conn.simple_bind_s(DN(('cn', 'directory manager')), self.dm_password)
else:
@ -558,7 +558,7 @@ class DsInstance(service.Service):
dsdb.track_server_cert("Server-Cert", self.principal, dsdb.passwd_fname, 'restart_dirsrv %s' % self.serverid)
dsdb.create_pin_file()
conn = ipaldap.IPAdmin("127.0.0.1")
conn = ipaldap.IPAdmin(self.fqdn)
conn.simple_bind_s(DN(('cn', 'directory manager')), self.dm_password)
mod = [(ldap.MOD_REPLACE, "nsSSLClientAuth", "allowed"),