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:10:40 +0100
commit3149069126599133a8fe0c66734df6deb3907dfb (patch)
treecc76246f3e6a75cd0b4a16c2225020e680a6e0b4 /src/external
parent07d69e93a2d2ba68c2fe67d8fb5de18cf69ba797 (diff)
downloadsssd-3149069126599133a8fe0c66734df6deb3907dfb.tar.gz
sssd-3149069126599133a8fe0c66734df6deb3907dfb.tar.xz
sssd-3149069126599133a8fe0c66734df6deb3907dfb.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> (cherry picked from commit bf54fbed126ec3d459af40ea370ffadacd31c76d)
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"])