summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-10-17 10:07:23 -0700
committerKarolin Seeger <kseeger@samba.org>2016-10-20 10:45:27 +0200
commit92bc3963a92f86c2e37d22c08ad8b6ff2bb6e88a (patch)
tree9719a6d5782dd41d85a36fc6dc8d66fa8286790a /libcli
parentd465cabc8ea1080f52376ec3c8bf6c955e68be39 (diff)
downloadsamba-92bc3963a92f86c2e37d22c08ad8b6ff2bb6e88a.tar.gz
s3: cldap: cldap_multi_netlogon_send() fails with one bad IPv6 address.
Analysis by: Rebecca Gellman <rebecca@starfleet-net.co.uk> Ignore cldap_socket_init() failure when sending multiple cldap netlogon requests. Allow cldap_netlogon_send() to catch the bad address and correctly return through a tevent subreq. Make sure cldap_search_send() copes with cldap parameter == NULL. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12381 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Tue Oct 18 02:16:20 CEST 2016 on sn-devel-144 (cherry picked from commit 44a7040500d74551b48eba04f5d0bedb1ec35ba6)
Diffstat (limited to 'libcli')
-rw-r--r--libcli/cldap/cldap.c5
1 files changed, 5 insertions, 0 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);