freeipa/ipaserver
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
..
advise ipa-advise: fallback to /usr/libexec/platform-python if python3 not found 2020-05-05 11:50:01 +02:00
dnssec named: Allow using of a custom OpenSSL engine for BIND 2020-08-31 09:42:31 +03:00
install Unify access to FQDN 2020-10-26 17:11:19 +11:00
plugins Extend IPA pwquality plugin to include libpwquality support 2020-10-23 09:32:52 -04:00
secrets NSSWrappedCertDB: accept optional symmetric algorithm 2019-09-25 12:42:06 +10:00
__init__.py Change FreeIPA license to GPLv3+ 2010-12-20 17:19:53 -05:00
dcerpc_common.py Py3: Replace six.text_type with str 2018-09-27 16:11:18 +02:00
dcerpc.py Unify access to FQDN 2020-10-26 17:11:19 +11:00
dns_data_management.py Lookup ipa-ca record with NSS 2020-10-10 12:54:06 +02:00
Makefile.am Build: Makefiles for Python packages 2016-11-09 13:08:32 +01:00
masters.py Add hidden replica feature 2019-03-28 17:57:58 +01:00
p11helper.py Grammar: whitespace is a word 2020-06-23 10:16:29 +02:00
rpcserver.py Handle DatabaseError in RPC-Server connect() 2020-06-07 10:33:15 +03:00
servroles.py Use api.env.container_sysaccounts 2020-04-28 11:28:29 +02:00
setup.cfg Port all setup.py to setuptools 2016-10-20 18:43:37 +02:00
setup.py Delay import of psutil to avoid AVC 2020-09-23 14:49:15 +02:00
topology.py Py3: Remove subclassing from object 2018-09-27 11:49:04 +02:00