diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2011-06-10 14:01:17 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-07-13 12:35:45 -0400 |
commit | 90f150f678347f1f73ee4280cd523021e307d861 (patch) | |
tree | fe93aa07c20d98522fd0c359f50c69b7519f49e0 /src/providers/ldap | |
parent | 401bfa7e4f8c2ed555576576881a2bd9622c1e2e (diff) | |
download | sssd_unused-90f150f678347f1f73ee4280cd523021e307d861.tar.gz sssd_unused-90f150f678347f1f73ee4280cd523021e307d861.tar.xz sssd_unused-90f150f678347f1f73ee4280cd523021e307d861.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/ldap')
-rw-r--r-- | src/providers/ldap/ldap_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c index 29546926..950c6e5a 100644 --- a/src/providers/ldap/ldap_common.c +++ b/src/providers/ldap/ldap_common.c @@ -529,7 +529,7 @@ static void sdap_uri_callback(void *private_data, struct fo_server *server) { TALLOC_CTX *tmp_ctx = NULL; struct sdap_service *service; - struct hostent *srvaddr; + struct resolv_hostent *srvaddr; char *address; const char *safe_address; const char *tmp; @@ -567,7 +567,7 @@ static void sdap_uri_callback(void *private_data, struct fo_server *server) } safe_address = sss_ldap_escape_ip_address(tmp_ctx, - srvaddr->h_addrtype, + srvaddr->family, address); talloc_zfree(address); if (safe_address == NULL) { |