Ensure that the system hostname is lower-case.

ticket 1080
This commit is contained in:
Rob Crittenden
2011-03-17 10:22:33 -04:00
parent 861d1bbdca
commit 15e213d025
2 changed files with 11 additions and 5 deletions

View File

@@ -101,6 +101,9 @@ def verify_fqdn(host_name,no_host_dns=False):
if len(host_name.split(".")) < 2 or host_name == "localhost.localdomain":
raise RuntimeError("Invalid hostname '%s', must be fully-qualified." % host_name)
if host_name != host_name.lower():
raise RuntimeError("Invalid hostname '%s', must be lower-case." % host_name)
try:
hostaddr = socket.getaddrinfo(host_name, None)
except: