summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2011-07-25 17:14:01 +0200
committerRob Crittenden <rcritten@redhat.com>2011-07-25 01:47:52 -0400
commit9e7a3e7f3c46f8c2fc0b54353efd642b4178abf7 (patch)
treeaf10bdf4ad6d158f5b5182a3c1b546a05de795de /ipaserver
parent53ab352b4a4b650d2dea39599b8aa36e5431ffa8 (diff)
downloadfreeipa-9e7a3e7f3c46f8c2fc0b54353efd642b4178abf7.zip
freeipa-9e7a3e7f3c46f8c2fc0b54353efd642b4178abf7.tar.gz
freeipa-9e7a3e7f3c46f8c2fc0b54353efd642b4178abf7.tar.xz
Make sure that hostname specified by user is not an IP address.
ticket 1375
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/installutils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
index c6e8641..df63b8e 100644
--- a/ipaserver/install/installutils.py
+++ b/ipaserver/install/installutils.py
@@ -120,6 +120,9 @@ def verify_fqdn(host_name,no_host_dns=False):
if host_name != host_name.lower():
raise RuntimeError("Invalid hostname '%s', must be lower-case." % host_name)
+ if ipautil.valid_ip(host_name):
+ raise RuntimeError("IP address not allowed as a hostname")
+
if no_host_dns:
print "Warning: skipping DNS resolution of host", host_name
return