Files
freeipa/util/Makefile.am
T
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

28 lines
560 B
Makefile

NULL =
AUTOMAKE_OPTIONS = 1.7 subdir-objects
AM_CPPFLAGS = $(CRYPTO_CFLAGS) $(KRB5_CFLAGS) $(LDAP_CFLAGS) $(PWQUALITY_CFLAGS)
noinst_LTLIBRARIES = libutil.la
libutil_la_SOURCES = \
ipa_hostname.c \
ipa_hostname.h \
ipa_krb5.c \
ipa_krb5.h \
ipa_mspac.h \
ipa_ldap.c \
ipa_ldap.h \
ipa_pwd.c \
ipa_pwd.h \
ipa_pwd_ntlm.c \
$(NULL)
libutil_la_LIBADD = $(CRYPTO_LIBS) $(KRB5_LIBS) $(LDAP_LIBS) $(PWQUALITY_LIBS)
check_PROGRAMS = t_pwd t_policy
TESTS = $(check_PROGRAMS)
t_pwd_LDADD = libutil.la
t_policy_LDADD = libutil.la