diff options
author | Jeremy Allison <jra@samba.org> | 2002-10-01 23:07:00 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-10-01 23:07:00 +0000 |
commit | 919a78f00539249b9da6206840785d304dcc8ed7 (patch) | |
tree | 7bc1a517c921dd274547f833bcebb750b356fea0 | |
parent | d962f8b3c04c066aa65141ba4d63552d40e8b041 (diff) | |
download | samba-919a78f00539249b9da6206840785d304dcc8ed7.tar.gz samba-919a78f00539249b9da6206840785d304dcc8ed7.tar.bz2 samba-919a78f00539249b9da6206840785d304dcc8ed7.zip |
Doh ! Lookup name before checking negative cache (the way Tim originally
had it...).
Jeremy.
(This used to be commit 6929b65954ff5b94d11db79c8fc6a295311c238f)
-rw-r--r-- | source3/nsswitch/winbindd_cm.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 97d9159f66..0de6c9022b 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -398,6 +398,16 @@ static NTSTATUS cm_open_connection(const char *domain,const char *pipe_name, fstrcpy(new_conn->domain, domain); fstrcpy(new_conn->pipe_name, pipe_name); + /* Look for a domain controller for this domain. Negative results + are cached so don't bother applying the caching for this + function just yet. */ + + if (!cm_get_dc_name(domain, new_conn->controller, &dc_ip)) { + result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND; + add_failed_connection_entry(new_conn, result); + return result; + } + /* Return false if we have tried to look up this domain and netbios name before and failed. */ @@ -429,16 +439,6 @@ static NTSTATUS cm_open_connection(const char *domain,const char *pipe_name, return result; } - /* Look for a domain controller for this domain. Negative results - are cached so don't bother applying the caching for this - function just yet. */ - - if (!cm_get_dc_name(domain, new_conn->controller, &dc_ip)) { - result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND; - add_failed_connection_entry(new_conn, result); - return result; - } - /* Initialise SMB connection */ cm_get_ipc_userpass(&ipc_username, &ipc_domain, &ipc_password); |