https://fedorahosted.org/freeipa/ticket/1717
Honza -- Jan Cholasta
>From 583aa421e0e4082eccd953e2285dae7ca0494a61 Mon Sep 17 00:00:00 2001 From: Jan Cholasta <jchol...@redhat.com> Date: Tue, 6 Sep 2011 12:55:40 +0200 Subject: [PATCH] Check that install hostname matches the server hostname. ticket 1717 --- ipaserver/install/installutils.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py index fd978e7..109f75b 100644 --- a/ipaserver/install/installutils.py +++ b/ipaserver/install/installutils.py @@ -127,6 +127,10 @@ 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 + '.'): + raise RuntimeError("The host name '%s' does not match the system host name '%s'" % (host_name, system_host_name)) + if no_host_dns: print "Warning: skipping DNS resolution of host", host_name return -- 1.7.6
_______________________________________________ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel