mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Handle socket.gethostbyaddr() exceptions when verifying hostnames.
Log any socket exceptions raised and let the process continue. This failure isn't a show-stopper. Other checks past this will catch any other problems. This was seen when /etc/hosts and /etc/resolv.conf were both empty. https://fedorahosted.org/freeipa/ticket/3581
This commit is contained in:
parent
63e79a3d86
commit
bd89e49ed7
@ -128,6 +128,8 @@ def verify_fqdn(host_name, no_host_dns=False, local_hostname=True):
|
||||
"Please check /etc/hosts or DNS name resolution" % (host_name, ex_name[0]))
|
||||
except socket.gaierror:
|
||||
pass
|
||||
except socket.error, e:
|
||||
root_logger.debug('socket.gethostbyaddr() error: %d: %s' % (e.errno, e.strerror))
|
||||
|
||||
if no_host_dns:
|
||||
print "Warning: skipping DNS resolution of host", host_name
|
||||
|
Loading…
Reference in New Issue
Block a user