summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2013-11-26 12:15:33 +0100
committerMartin Kosek <mkosek@redhat.com>2013-12-09 13:34:39 +0100
commit89ab877c5cb2efb10f8a0cf0684ffc28f23cfb72 (patch)
tree8b725dd9b4a8f09692e86285b69df59c51511ece
parent9677308caa78ed722570aea32f21334b8c27bad3 (diff)
downloadfreeipa-89ab877c5cb2efb10f8a0cf0684ffc28f23cfb72.tar.gz
freeipa-89ab877c5cb2efb10f8a0cf0684ffc28f23cfb72.tar.xz
freeipa-89ab877c5cb2efb10f8a0cf0684ffc28f23cfb72.zip
ipa-client-install: Always pass hostname to the ipa-join
The ipa-client-install script and ipa-join use different methods of resolving the hostname, the former uses gethostbyaddr() call, while the latter reads the "uinfo.nodename". This can result ipa-client-install failures in case of broken PTR records. https://fedorahosted.org/freeipa/ticket/4027
-rwxr-xr-xipa-client/ipa-install/ipa-client-install8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index 0b9c6e98..61f9de99 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -2243,13 +2243,13 @@ def install(options, env, fstore, statestore):
(ccache_fd, ccache_name) = tempfile.mkstemp()
os.close(ccache_fd)
env['KRB5CCNAME'] = os.environ['KRB5CCNAME'] = ccache_name
- join_args = ["/usr/sbin/ipa-join", "-s", cli_server[0], "-b", str(realm_to_suffix(cli_realm))]
+ join_args = ["/usr/sbin/ipa-join",
+ "-s", cli_server[0],
+ "-b", str(realm_to_suffix(cli_realm)),
+ "-h", hostname]
if options.debug:
join_args.append("-d")
env['XMLRPC_TRACE_CURL'] = 'yes'
- if options.hostname:
- join_args.append("-h")
- join_args.append(options.hostname)
if options.force_join:
join_args.append("-f")
if options.principal is not None: