summaryrefslogtreecommitdiffstats
path: root/src/external
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-12-12 17:10:25 +0100
committerJakub Hrozek <jhrozek@redhat.com>2015-02-11 11:03:34 +0100
commitbf54fbed126ec3d459af40ea370ffadacd31c76d (patch)
treefb600d300e7939e94b0eedc100a95c330de7d782 /src/external
parent4d7fe714fe74ad242497b2bdbeb7b4e0bf40141f (diff)
downloadsssd-bf54fbed126ec3d459af40ea370ffadacd31c76d.tar.gz
sssd-bf54fbed126ec3d459af40ea370ffadacd31c76d.tar.xz
sssd-bf54fbed126ec3d459af40ea370ffadacd31c76d.zip
RESOLV: Add an internal function to read TTL from a DNS packet
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 <pbrezina@redhat.com>
Diffstat (limited to 'src/external')
-rw-r--r--src/external/libresolv.m412
1 files changed, 12 insertions, 0 deletions
diff --git a/src/external/libresolv.m4 b/src/external/libresolv.m4
new file mode 100644
index 000000000..225cf2be8
--- /dev/null
+++ b/src/external/libresolv.m4
@@ -0,0 +1,12 @@
+AC_SUBST(RESOLV_CFLAGS)
+AC_SUBST(RESOLV_LIBS)
+
+# Some unit tests require libresolv to fake DNS packets
+SSS_AC_EXPAND_LIB_DIR()
+AC_CHECK_LIB([resolv],
+ [ns_name_compress],
+ [RESOLV_LIBS="-L$sss_extra_libdir -lresolv"],
+ [AC_MSG_WARN([No libresolv detected, some tests will not run])],
+ [-L$sss_extra_libdir])
+
+AM_CONDITIONAL([HAVE_LIBRESOLV], [test x"$RESOLV_LIBS" != "x"])