summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-04-18 06:56:44 +0000
committerAndrew Tridgell <tridge@samba.org>2002-04-18 06:56:44 +0000
commitc0a991943044e038b78f796fb35d7625eb843d85 (patch)
tree5a837cd8ab9f1ec00c42d8a623795eb604dc8329 /source3/nsswitch
parent6a9bc86d62cc9ba532392af02a5d71e50b6b0411 (diff)
downloadsamba-c0a991943044e038b78f796fb35d7625eb843d85.tar.gz
samba-c0a991943044e038b78f796fb35d7625eb843d85.tar.bz2
samba-c0a991943044e038b78f796fb35d7625eb843d85.zip
fixed the fallback to a BDC for ADS connections
(This used to be commit 3e58a1ee83ea0b4347ce24e566445cc6cb67bb3a)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_ads.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c
index af0933716b..6c00ddb95f 100644
--- a/source3/nsswitch/winbindd_ads.c
+++ b/source3/nsswitch/winbindd_ads.c
@@ -119,6 +119,8 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain)
if (resolve_name(domain->name, &server_ip, 0x1b)) {
sname = inet_ntoa(server_ip);
+ } else if (resolve_name(domain->name, &server_ip, 0x1c)) {
+ sname = inet_ntoa(server_ip);
} else {
if (strcasecmp(domain->name, lp_workgroup()) != 0) {
DEBUG(1,("can't find domain controller for %s\n", domain->name));
@@ -127,7 +129,7 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain)
sname = NULL;
}
- ads = ads_init(primary_realm, sname, NULL, NULL);
+ ads = ads_init(primary_realm, domain->name, NULL, NULL, NULL);
if (!ads) {
DEBUG(1,("ads_init for domain %s failed\n", domain->name));
return NULL;