summaryrefslogtreecommitdiff
path: root/source3/libads/ldap.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2012-05-04 17:27:36 -0400
committerAlexander Bokovoy <ab@samba.org>2012-05-23 17:51:48 +0300
commita7e94fce3f86b99c328669d45dd685fc70026378 (patch)
tree3e0f989c0c43a41d38eafa80e07805556d069793 /source3/libads/ldap.c
parent4a335e9632282d92c8d9c5fdae59114540ed0803 (diff)
downloadsamba-a7e94fce3f86b99c328669d45dd685fc70026378.tar.gz
samba-a7e94fce3f86b99c328669d45dd685fc70026378.tar.bz2
samba-a7e94fce3f86b99c328669d45dd685fc70026378.zip
s3-ads-dns: Break dependency on lp_parm
In preparation of making this code common to s3 and s4
Diffstat (limited to 'source3/libads/ldap.c')
-rw-r--r--source3/libads/ldap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 70dad2f496..23b655f401 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -553,6 +553,7 @@ ADS_STATUS ads_connect_gc(ADS_STRUCT *ads)
int i;
bool done = false;
char *sitename = NULL;
+ const char *dns_hosts_file;
if (!realm)
realm = lp_realm();
@@ -562,6 +563,7 @@ ADS_STATUS ads_connect_gc(ADS_STRUCT *ads)
sitename = sitename_fetch(realm);
}
+ dns_hosts_file = lp_parm_const_string(-1, "resolv", "host file", NULL);
do {
/* We try once with a sitename and once without
(unless we don't have a sitename and then we're
@@ -570,7 +572,8 @@ ADS_STATUS ads_connect_gc(ADS_STRUCT *ads)
if (sitename == NULL)
done = true;
- nt_status = ads_dns_query_gcs(frame, realm, sitename,
+ nt_status = ads_dns_query_gcs(frame, dns_hosts_file,
+ realm, sitename,
&gcs_list, &num_gcs);
SAFE_FREE(sitename);