pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0012-ipa-client-install-Always-pass-hostname-to-the-ipa-j.patch

9991ea
From ab33d06556e607b4477500f77d97f6ec7ee536c3 Mon Sep 17 00:00:00 2001
9991ea
From: Tomas Babej <tbabej@redhat.com>
9991ea
Date: Tue, 26 Nov 2013 12:15:33 +0100
9991ea
Subject: [PATCH] ipa-client-install: Always pass hostname to the ipa-join
9991ea
9991ea
The ipa-client-install script and ipa-join use different methods
9991ea
of resolving the hostname, the former uses gethostbyaddr() call,
9991ea
while the latter reads the "uinfo.nodename".
9991ea
9991ea
This can result ipa-client-install failures in case of broken PTR
9991ea
records.
9991ea
9991ea
https://fedorahosted.org/freeipa/ticket/4027
9991ea
---
9991ea
 ipa-client/ipa-install/ipa-client-install | 8 ++++----
9991ea
 1 file changed, 4 insertions(+), 4 deletions(-)
9991ea
9991ea
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
9991ea
index a898d388ee039752044008f8525424370098580a..5e966a3ae9fb9d5881d0fd4e8c2509f92e665d44 100755
9991ea
--- a/ipa-client/ipa-install/ipa-client-install
9991ea
+++ b/ipa-client/ipa-install/ipa-client-install
9991ea
@@ -2119,13 +2119,13 @@ def install(options, env, fstore, statestore):
9991ea
             (ccache_fd, ccache_name) = tempfile.mkstemp()
9991ea
             os.close(ccache_fd)
9991ea
             env['KRB5CCNAME'] = os.environ['KRB5CCNAME'] = ccache_name
9991ea
-            join_args = ["/usr/sbin/ipa-join", "-s", cli_server[0], "-b", str(realm_to_suffix(cli_realm))]
9991ea
+            join_args = ["/usr/sbin/ipa-join",
9991ea
+                         "-s", cli_server[0],
9991ea
+                         "-b", str(realm_to_suffix(cli_realm)),
9991ea
+                         "-h", hostname]
9991ea
             if options.debug:
9991ea
                 join_args.append("-d")
9991ea
                 env['XMLRPC_TRACE_CURL'] = 'yes'
9991ea
-            if options.hostname:
9991ea
-                join_args.append("-h")
9991ea
-                join_args.append(options.hostname)
9991ea
             if options.force_join:
9991ea
                 join_args.append("-f")
9991ea
             if options.principal is not None:
9991ea
-- 
9991ea
1.8.3.1
9991ea