Hello,

I have prepared a patch for https://fedorahosted.org/freeipa/ticket/2209

Feedback appreciated.

Best regards,
Lars
From 510bbfdc4e25eef715d3ceedf8e3463c771166ae Mon Sep 17 00:00:00 2001
From: Lars Sjostrom <l...@radicore.se>
Date: Wed, 21 Dec 2011 22:32:01 +0100
Subject: [PATCH] add disovery domain if client domain is different from
 server domain

---
 ipa-client/ipa-install/ipa-client-install |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index 8e945ce..e196561 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -661,7 +661,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):
+def configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options, client_domain):
     try:
         sssdconfig = SSSDConfig.SSSDConfig()
         sssdconfig.import_config()
@@ -706,6 +706,10 @@ def configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options):
 
     domain.add_provider('ipa', 'id')
 
+    #add discovery domain if client domain different from server domain
+    if cli_domain != client_domain:
+        domain.set_option('dns_discovery_domain', cli_domain)
+
     if not options.on_master:
         domain.set_option('ipa_server', '_srv_, %s' % cli_server)
     else:
@@ -1123,7 +1127,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):
+        if configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options, client_domain):
             return CLIENT_INSTALL_ERROR
         print "Configured /etc/sssd/sssd.conf"
 
-- 
1.7.7.4

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

Reply via email to