summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcli/cldap/cldap.c5
-rw-r--r--source3/libads/cldap.c17
2 files changed, 20 insertions, 2 deletions
diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c
index c5977cc994a..87f82b9b0de 100644
--- a/libcli/cldap/cldap.c
+++ b/libcli/cldap/cldap.c
@@ -585,6 +585,11 @@ struct tevent_req *cldap_search_send(TALLOC_CTX *mem_ctx,
talloc_set_destructor(state, cldap_search_state_destructor);
+ if (state->caller.cldap == NULL) {
+ tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
+ goto post;
+ }
+
if (io->in.dest_address) {
if (cldap->connected) {
tevent_req_nterror(req, NT_STATUS_PIPE_CONNECTED);
diff --git a/source3/libads/cldap.c b/source3/libads/cldap.c
index bd77943455f..586a04a0e42 100644
--- a/source3/libads/cldap.c
+++ b/source3/libads/cldap.c
@@ -117,8 +117,21 @@ struct tevent_req *cldap_multi_netlogon_send(
NULL, /* local_addr */
state->servers[i],
&state->cldap[i]);
- if (tevent_req_nterror(req, status)) {
- return tevent_req_post(req, ev);
+ if (!NT_STATUS_IS_OK(status)) {
+ /*
+ * Don't error out all sends just
+ * because one cldap_socket_init() failed.
+ * Log it here, and the cldap_netlogon_send()
+ * will catch it (with in.dest_address == NULL)
+ * and correctly error out in
+ * cldap_multi_netlogon_done(). This still allows
+ * the other requests to be concurrently sent.
+ */
+ DBG_NOTICE("cldap_socket_init failed for %s "
+ " error %s\n",
+ tsocket_address_string(state->servers[i],
+ req),
+ nt_errstr(status));
}
state->ios[i].in.dest_address = NULL;