summaryrefslogtreecommitdiffstats
path: root/ipa-server
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2008-05-23 14:51:50 -0400
committerSimo Sorce <ssorce@redhat.com>2008-05-29 09:43:00 -0400
commit53afb67537f6be9712f2cb23fb021d204b5182b0 (patch)
tree788c8f0111b39c9e286034fbd6f73258e850cc13 /ipa-server
parentc5d6ad5c6e971e6663d1ebeb2b558d8a731a9607 (diff)
downloadfreeipa-53afb67537f6be9712f2cb23fb021d204b5182b0.tar.gz
freeipa-53afb67537f6be9712f2cb23fb021d204b5182b0.tar.xz
freeipa-53afb67537f6be9712f2cb23fb021d204b5182b0.zip
Fix the case where domain != lower(REALM)
add the domain to the ipa.conf file for apps that need to know This should fix a bug in the replica setup
Diffstat (limited to 'ipa-server')
-rw-r--r--ipa-server/ipa-install/ipa-replica-install9
-rw-r--r--ipa-server/ipa-install/ipa-replica-prepare11
-rw-r--r--ipa-server/ipa-install/ipa-server-install1
3 files changed, 12 insertions, 9 deletions
diff --git a/ipa-server/ipa-install/ipa-replica-install b/ipa-server/ipa-install/ipa-replica-install
index a42c970ae..2b3751655 100644
--- a/ipa-server/ipa-install/ipa-replica-install
+++ b/ipa-server/ipa-install/ipa-replica-install
@@ -33,6 +33,7 @@ from ipaserver import version
class ReplicaConfig:
def __init__(self):
self.realm_name = ""
+ self.domain_name = ""
self.master_host_name = ""
self.dirman_password = ""
self.ds_user = ""
@@ -232,6 +233,14 @@ def main():
install_krb(config)
install_http(config)
+ # Create the config file
+ fd = open("/etc/ipa/ipa.conf", "w")
+ fd.write("[defaults]\n")
+ fd.write("server=" + config.host_name + "\n")
+ fd.write("realm=" + config.realm_name + "\n")
+ fd.write("domain=" + config.domain_name + "\n")
+ fd.close()
+
# Create a Web Gui instance
webgui = httpinstance.WebGuiInstance()
webgui.create_instance()
diff --git a/ipa-server/ipa-install/ipa-replica-prepare b/ipa-server/ipa-install/ipa-replica-prepare
index 4090ad8a1..914557dc2 100644
--- a/ipa-server/ipa-install/ipa-replica-prepare
+++ b/ipa-server/ipa-install/ipa-replica-prepare
@@ -66,18 +66,11 @@ def get_realm_name():
def get_domain_name():
try:
- conn = ipaldap.IPAdmin("127.0.0.1")
- conn.simple_bind_s("", "")
-
- context = conn.getEntry("", ldap.SCOPE_BASE, '(objectclass=*)', [ 'namingContexts' ])
- conn.unbind()
+ ipa.config.init_config()
+ domain_name = ipa.config.config.get_domain()
except Exception, e:
return None
- domain_name = context.getValue('namingContexts')
- domain_name = domain_name.replace('dc=','')
- domain_name = domain_name.replace(',','.')
-
return domain_name
def check_ipa_configuration(realm_name):
diff --git a/ipa-server/ipa-install/ipa-server-install b/ipa-server/ipa-install/ipa-server-install
index b979e9955..9b0baa24c 100644
--- a/ipa-server/ipa-install/ipa-server-install
+++ b/ipa-server/ipa-install/ipa-server-install
@@ -495,6 +495,7 @@ def main():
fd.write("[defaults]\n")
fd.write("server=" + host_name + "\n")
fd.write("realm=" + realm_name + "\n")
+ fd.write("domain=" + domain_name + "\n")
fd.close()
# Create a Web Gui instance