From a36bc4ee93d13c28f8edf2bb94eb4dbfc25be568 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 15 Mar 2011 09:12:35 -0400 Subject: Always consider domain and server when doing DNS discovery in client. When not on master we weren't passing in the user-supplied domain and server. Because of changes made that require TLS on the LDAP calls we always need the server name early in the process to retrieve the IPA CA certificate. ticket 1090 --- ipa-client/ipa-install/ipa-client-install | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 720e8135..4ff4c458 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -684,10 +684,8 @@ def main(): # Create the discovery instance ds = ipaclient.ipadiscovery.IPADiscovery() - if options.on_master: - ret = ds.search(domain=options.domain, server=options.server) - else: - ret = ds.search() + ret = ds.search(domain=options.domain, server=options.server) + if ret == -10: print >>sys.stderr, "Can't get the fully qualified name of this host" print >>sys.stderr, "Please check that the client is properly configured" @@ -703,10 +701,8 @@ def main(): print "DNS discovery failed to determine your DNS domain" cli_domain = user_input("Please provide the domain name of your IPA server (ex: example.com)", allow_empty = False) logging.debug("will use domain: %s\n", cli_domain) - if options.on_master: - ret = ds.search(domain=cli_domain, server=options.server) - else: - ret = ds.search(domain=cli_domain) + ret = ds.search(domain=cli_domain, server=options.server) + if not cli_domain: if ds.getDomainName(): cli_domain = ds.getDomainName() -- cgit