Use our domain validator to validate the domain name we get in the
installer.
rob
>From d49c1a8afea2ef72e9084018a354d60d21dff0fb Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcrit...@redhat.com>
Date: Fri, 11 May 2012 15:56:43 -0400
Subject: [PATCH] Call the domain validator on the user-provided domain name.
Wrap printing exceptions in unicode() to do Gettext conversion.
https://fedorahosted.org/freeipa/ticket/2196
---
install/tools/ipa-server-install | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index 1dd02ba870a02e902c4c345d9f5802ef09f78a7a..bc0eb9dee35b471e7f81f2a3382a706af8e3843a 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -62,6 +62,7 @@ from ipapython.config import IPAOptionParser
from ipalib.dn import DN
from ipalib.x509 import load_certificate_from_file, load_certificate_chain_from_file
from ipalib.constants import DNS_ZONE_REFRESH
+from ipalib.util import validate_domain_name
from ipapython import services as ipaservices
from ipapython.ipa_log_manager import *
@@ -727,6 +728,7 @@ def main():
domain_name = options.domain_name
domain_name = domain_name.lower()
+ validate_domain_name(domain_name)
ip = get_server_ip_address(host_name, fstore, options.unattended, options)
ip_address = str(ip)
@@ -1108,9 +1110,9 @@ try:
except Exception, e:
success = False
if uninstalling:
- message = "Unexpected error - see ipaserver-uninstall.log for details:\n %s" % str(e)
+ message = "Unexpected error - see ipaserver-uninstall.log for details:\n %s" % unicode(e)
else:
- message = "Unexpected error - see ipaserver-install.log for details:\n %s" % str(e)
+ message = "Unexpected error - see ipaserver-install.log for details:\n %s" % unicode(e)
print message
message = str(e)
for str in traceback.format_tb(sys.exc_info()[2]):
--
1.7.7.6
_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel