diff options
author | Jeremy Allison <jra@samba.org> | 2006-12-05 06:15:23 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:16:21 -0500 |
commit | 490e3205bcf0866f6089a2b3964ad34d92d4c807 (patch) | |
tree | dca4e79f3007d2662b271273d798c5f131124159 | |
parent | 2494868ffba14d425531df98651d777a13d3be28 (diff) | |
download | samba-490e3205bcf0866f6089a2b3964ad34d92d4c807.tar.gz samba-490e3205bcf0866f6089a2b3964ad34d92d4c807.tar.bz2 samba-490e3205bcf0866f6089a2b3964ad34d92d4c807.zip |
r20035: Fix obvious horrible bug in falling back to MS-RPC
methods.
Jeremy.
(This used to be commit 7ac4ae4b517a18e97673e95d862a5b18175252c1)
-rw-r--r-- | source3/nsswitch/winbindd_ads.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c index 7f5d098c45..113f14a3b7 100644 --- a/source3/nsswitch/winbindd_ads.c +++ b/source3/nsswitch/winbindd_ads.c @@ -109,7 +109,6 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain) status = ads_connect(ads); if (!ADS_ERR_OK(status) || !ads->config.realm) { - extern struct winbindd_methods msrpc_methods, cache_methods; DEBUG(1,("ads_connect for domain %s failed: %s\n", domain->name, ads_errstr(status))); ads_destroy(&ads); @@ -118,12 +117,10 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain) server, fall back to MSRPC */ if (status.error_type == ENUM_ADS_ERROR_SYSTEM && status.err.rc == ECONNREFUSED) { + extern struct winbindd_methods reconnect_methods; + /* 'reconnect_methods' is the MS-RPC backend. */ DEBUG(1,("Trying MSRPC methods\n")); - if (domain->methods == &cache_methods) { - domain->backend = &msrpc_methods; - } else { - domain->methods = &msrpc_methods; - } + domain->backend = &reconnect_methods; } return NULL; } |