mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Ensure that the system hostname is lower-case.
ticket 1080
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user