diff options
author | Jeremy Allison <jra@samba.org> | 2002-09-24 22:56:59 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-09-24 22:56:59 +0000 |
commit | 38c67632ade40413c0cc2b91e04105e4065a18b7 (patch) | |
tree | cc6cc0f4ec7b8635d9ad7460a763fb9f4088d752 /source | |
parent | d312e1c2b44905af87c4d550975eee78dbf2edee (diff) | |
download | samba-38c67632ade40413c0cc2b91e04105e4065a18b7.tar.gz samba-38c67632ade40413c0cc2b91e04105e4065a18b7.tar.xz samba-38c67632ade40413c0cc2b91e04105e4065a18b7.zip |
Moved -ve cache check to correct place.
Jeremy.
Diffstat (limited to 'source')
-rw-r--r-- | source/nsswitch/winbindd_cm.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/nsswitch/winbindd_cm.c b/source/nsswitch/winbindd_cm.c index 0b9e38eb1f2..01f55698893 100644 --- a/source/nsswitch/winbindd_cm.c +++ b/source/nsswitch/winbindd_cm.c @@ -382,16 +382,6 @@ 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. */ @@ -423,6 +413,16 @@ 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); |