omit the last dot of cname when krb_canon_host=True

fixes: #801
relates: #653
This commit is contained in:
Yuming Zhu 2018-02-07 23:55:14 +08:00 committed by Mike McLean
parent e01cb9b346
commit 16a94a5762

View file

@ -2198,7 +2198,7 @@ class ClientSession(object):
self.logger.warning('python-dns missing -- cannot resolve hostname')
else:
answer = dns_resolver.query(host, 'A')
return answer.canonical_name.to_text()
return answer.canonical_name.to_text(omit_final_dot=True)
if self.opts.get('krb_rdns', True):
return socket.getfqdn(host)
# else