summaryrefslogtreecommitdiff
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
commite97b40e09427c2c5f0a497f9432af08d6d6762f2 (patch)
tree50c05c0e701bd0bfb5f08cbefd7d220104de21a0
parent05a90a28843e0d69183a49a76617c5f32817df16 (diff)
downloadsamba-e97b40e09427c2c5f0a497f9432af08d6d6762f2.tar.gz
add support for mixtures of ADS/NT4 domains, as long as the primary
domain is ADS
-rw-r--r--source/nsswitch/winbindd_ads.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/nsswitch/winbindd_ads.c b/source/nsswitch/winbindd_ads.c
index 749adafcb6f..e144fffc59c 100644
--- a/source/nsswitch/winbindd_ads.c
+++ b/source/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;
}