From bf54fbed126ec3d459af40ea370ffadacd31c76d Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 12 Dec 2014 17:10:25 +0100 Subject: RESOLV: Add an internal function to read TTL from a DNS packet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related: https://fedorahosted.org/sssd/ticket/1884 Adds an internal resolver function that reads the TTL for SRV records as specified by RFC-2181. Several internal c-ares definitions are used until c-ares contains a function that exposes all this information via a parsing function. Reviewed-by: Pavel Březina --- Makefile.am | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index ff17b41c1..0975dc2ba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -222,6 +222,10 @@ if HAVE_CMOCKA test_sbus_opath \ $(NULL) +if HAVE_LIBRESOLV +non_interactive_cmocka_based_tests += test_resolv_fake +endif # HAVE_LIBRESOLV + if BUILD_IFP non_interactive_cmocka_based_tests += ifp_tests endif # BUILD_IFP @@ -2221,6 +2225,29 @@ test_sbus_opath_LDADD = \ libsss_debug.la \ libsss_test_common.la +if HAVE_LIBRESOLV +test_resolv_fake_SOURCES = \ + src/tests/cmocka/test_resolv_fake.c \ + src/resolv/async_resolv.c \ + $(NULL) +test_resolv_fake_CFLAGS = \ + $(AM_CFLAGS) \ + $(NULL) +test_resolv_fake_LDFLAGS = \ + -Wl,-wrap,ares_query \ + $(NULL) +test_resolv_fake_LDADD = \ + $(CMOCKA_LIBS) \ + $(POPT_LIBS) \ + $(TALLOC_LIBS) \ + $(CARES_LIBS) \ + $(DHASH_LIBS) \ + $(RESOLV_LIBS) \ + libsss_debug.la \ + libsss_test_common.la \ + $(NULL) +endif # HAVE_LIBRESOLV + endif # HAVE_CMOCKA noinst_PROGRAMS = pam_test_client -- cgit