summaryrefslogtreecommitdiffstats
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-19 12:38:52 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-19 12:38:52 +0000
commita04aec58d34f2382c97474888a921e41a2dff021 (patch)
treeac9f2de73a5ef576219b1d2663a93cf4a9c11b3b /source3/nsswitch
parent1f31ace6cb771d7bf0b64091fba1d24c466ad4e5 (diff)
downloadsamba-a04aec58d34f2382c97474888a921e41a2dff021.tar.gz
samba-a04aec58d34f2382c97474888a921e41a2dff021.tar.xz
samba-a04aec58d34f2382c97474888a921e41a2dff021.zip
add support for mixtures of ADS/NT4 domains, as long as the primary
domain is ADS (This used to be commit e97b40e09427c2c5f0a497f9432af08d6d6762f2)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_ads.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c
index 749adafcb6..e144fffc59 100644
--- a/source3/nsswitch/winbindd_ads.c
+++ b/source3/nsswitch/winbindd_ads.c
@@ -129,9 +129,18 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain)
status = ads_connect(ads);
if (!ADS_ERR_OK(status)) {
+ extern struct winbindd_methods msrpc_methods;
DEBUG(1,("ads_connect for domain %s failed: %s\n",
domain->name, ads_errstr(status)));
ads_destroy(&ads);
+
+ /* if we get ECONNREFUSED then it might be a NT4
+ server, fall back to MSRPC */
+ if (status.error_type == ADS_ERROR_SYSTEM &&
+ status.rc == ECONNREFUSED) {
+ DEBUG(1,("Trying MSRPC methods\n"));
+ domain->methods = &msrpc_methods;
+ }
return NULL;
}