summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-06-10 14:01:17 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-10-26 10:29:37 -0400
commit5644466f51273d55ba2b4b2931fada06c2d837fe (patch)
tree720acfa4b3fe9826a63b84064b533308a3b94c54 /src/providers/ipa
parent50d9a9356ac4285363b66f15e4ee4cea365192c8 (diff)
downloadsssd-5644466f51273d55ba2b4b2931fada06c2d837fe.tar.gz
sssd-5644466f51273d55ba2b4b2931fada06c2d837fe.tar.xz
sssd-5644466f51273d55ba2b4b2931fada06c2d837fe.zip
Honor the TTL value of SRV record lookups
Add new resolv_hostent data structure and utility functions Resolve hosts by name from files into resolv_hostent Resolve hosts by name from DNS into resolv_hostent Switch resolver to using resolv_hostent and honor TTL Conflicts: src/providers/fail_over.c Provide TTL structure names for c-ares < 1.7 https://fedorahosted.org/sssd/ticket/898 In c-ares 1.7, the upstream renamed the addrttl/addr6ttl structures to ares_addrttl/ares_addr6ttl so they are in the ares_ namespace. Because they are committed to stable ABI, the contents are the same, just the name changed -- so it is safe to just #define the new name for older c-ares version in case the new one is not detected in configure time.
Diffstat (limited to 'src/providers/ipa')
-rw-r--r--src/providers/ipa/ipa_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c
index 1a81bea75..647c1c187 100644
--- a/src/providers/ipa/ipa_common.c
+++ b/src/providers/ipa/ipa_common.c
@@ -557,7 +557,7 @@ static void ipa_resolve_callback(void *private_data, struct fo_server *server)
{
TALLOC_CTX *tmp_ctx = NULL;
struct ipa_service *service;
- struct hostent *srvaddr;
+ struct resolv_hostent *srvaddr;
char *address;
const char *safe_address;
char *new_uri;
@@ -592,7 +592,7 @@ static void ipa_resolve_callback(void *private_data, struct fo_server *server)
}
safe_address = sss_ldap_escape_ip_address(tmp_ctx,
- srvaddr->h_addrtype,
+ srvaddr->family,
address);
if (safe_address == NULL) {
DEBUG(1, ("sss_ldap_escape_ip_address failed.\n"));