summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2011-09-06 12:55:40 +0200
committerRob Crittenden <rcritten@redhat.com>2011-09-14 22:42:05 -0400
commitb43a38e9cbdd376dda17a2b2079ac8051d884030 (patch)
treebe50404fcd3cfbb579aad04191d5d852365022ee /ipaserver
parent566fa8ddc504c1d671ee8954ba0278342d7cdff7 (diff)
downloadfreeipa-b43a38e9cbdd376dda17a2b2079ac8051d884030.tar.gz
freeipa-b43a38e9cbdd376dda17a2b2079ac8051d884030.tar.xz
freeipa-b43a38e9cbdd376dda17a2b2079ac8051d884030.zip
Check that install hostname matches the server hostname.
ticket 1717
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/installutils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
index 57601d7af..d9b391f38 100644
--- a/ipaserver/install/installutils.py
+++ b/ipaserver/install/installutils.py
@@ -127,6 +127,11 @@ def verify_fqdn(host_name,no_host_dns=False):
if ipautil.valid_ip(host_name):
raise RuntimeError("IP address not allowed as a hostname")
+ system_host_name = socket.gethostname()
+ if not (host_name + '.').startswith(system_host_name + '.'):
+ print "Warning: The host name '%s' does not match the system host name '%s'." % (host_name, system_host_name)
+ print " Some services may not work properly."
+
if no_host_dns:
print "Warning: skipping DNS resolution of host", host_name
return