freeipa/daemons/ipa-slapi-plugins/ipa-cldap
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
..
ipa_cldap_netlogon.c Unify access to FQDN 2020-10-26 17:11:19 +11:00
ipa_cldap_tests.c cmocka_tests: Do not use deprecated cmocka interface 2015-11-18 12:54:43 +01:00
ipa_cldap_worker.c CLDAP: make sure an empty reply is returned on any error 2013-08-29 15:28:18 +02:00
ipa_cldap.c Fix compilation error in ipa-cldap. 2013-12-06 14:44:40 +01:00
ipa_cldap.h Migrate from #ifndef guards to #pragma once 2016-05-29 14:04:45 +02:00
ipa-cldap-conf.ldif Create skeleton CLDAP server as a DS plugin 2011-11-21 18:52:48 -05:00
Makefile.am Unify access to FQDN 2020-10-26 17:11:19 +11:00