https://fedorahosted.org/freeipa/ticket/2527

ipa-client-install will always set ipa_hostname for sssd.conf in order
to prevent the client from getting into weird state.

--
Regards,

Ondrej Hamada
FreeIPA team
jabber:oh...@jabbim.cz
IRC: ohamada

From 4f471211d6e0ab33e17bc1cda5d7c89045e2b3d5 Mon Sep 17 00:00:00 2001
From: Ondrej Hamada <oham...@redhat.com>
Date: Thu, 12 Apr 2012 14:19:15 +0200
Subject: [PATCH] Always set ipa_hostname for sssd.conf

ipa-client-install will always set ipa_hostname for sssd.conf in order
to prevent the client from getting into weird state.

https://fedorahosted.org/freeipa/ticket/2527
---
 ipa-client/ipa-install/ipa-client-install |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index 75c60653c6882a73d20a4d40fcb9713799aeea41..828dbd8fb5d41fb6e61c1abccd83cbbe8c3a838f 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -695,7 +695,7 @@ def configure_certmonger(fstore, subject_base, cli_realm, hostname, options):
         except:
             print "%s request for host certificate failed" % (cmonger.service_name)
 
-def configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options, client_domain):
+def configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options, client_domain, client_hostname):
     try:
         sssdconfig = SSSDConfig.SSSDConfig()
         sssdconfig.import_config()
@@ -758,8 +758,7 @@ def configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options, clie
         # the master should only use itself for Kerberos
         domain.set_option('ipa_server', cli_server)
     domain.set_option('ipa_domain', cli_domain)
-    if options.hostname:
-        domain.set_option('ipa_hostname', options.hostname)
+    domain.set_option('ipa_hostname', client_hostname)
     if cli_domain.lower() != cli_realm.lower():
         domain.set_option('krb5_realm', cli_realm)
 
@@ -1352,7 +1351,7 @@ def install(options, env, fstore, statestore):
     # Always back up sssd.conf. It gets updated by authconfig --enablekrb5.
     fstore.backup_file("/etc/sssd/sssd.conf")
     if options.sssd:
-        if configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options, client_domain):
+        if configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options, client_domain, hostname):
             return CLIENT_INSTALL_ERROR
         print "Configured /etc/sssd/sssd.conf"
 
-- 
1.7.6.5

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to