If we black listed a server we should not use it even if
it responses to CLDAP requests.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14981
Signed-off-by: Stefan Metzmacher <metze@samba.org>
ok = ads_try_connect(ads, false, &sa_list[i].u.ss);
if (ok) {
- return NT_STATUS_OK;
+ NTSTATUS status;
+
+ status = check_negative_conn_cache(domain,
+ ads->config.ldap_server_name);
+ if (NT_STATUS_IS_OK(status)) {
+ /*
+ * only use the server if it's not black listed
+ * by name
+ */
+ return NT_STATUS_OK;
+ }
}
/* keep track of failures */