mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r20035: Fix obvious horrible bug in falling back to MS-RPC
methods.
Jeremy.
(This used to be commit 7ac4ae4b51
)
This commit is contained in:
parent
2494868ffb
commit
490e3205bc
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user