Files
freeipa/ipalib
Christian Heimes e28ec76898 Unify access to FQDN
FreeIPA's Python and C code used different approaches to get the FQDN of
the host. Some places assumed that gethostname() returns a FQDN. Other
code paths used glibc's resolver to resolve the current node name to a
FQDN.

Python code now uses the ipalib.constants.FQDN where a fully qualified
domain name is expected. The variable is initialized only once and avoids
potential DNS lookups.

C code uses a new helper function ipa_gethostfqdn() in util package. The
function implements similar logic as gethostfqdn() except it uses more
modern getaddrinfo(). The result is cached as well.

Fixes: https://pagure.io/freeipa/issue/8501
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
2020-10-26 17:11:19 +11:00
..
2020-02-12 18:08:32 +02:00
2018-07-14 12:04:19 +02:00
2018-09-27 16:11:18 +02:00
2016-11-24 15:46:40 +01:00
2020-10-26 17:11:19 +11:00
2020-07-07 12:36:10 +02:00
2017-02-17 10:22:07 +01:00
2020-07-07 12:36:10 +02:00
2017-10-25 09:46:41 +02:00
2018-09-27 11:49:04 +02:00
2020-06-29 12:03:16 +10:00
2016-10-20 18:43:37 +02:00
2020-08-31 09:46:03 +03:00
2020-06-30 16:18:21 +02:00