summaryrefslogtreecommitdiff
path: root/libcli/cldap
AgeCommit message (Collapse)AuthorFilesLines
2024-11-11libcli: Make cldap_error_reply() static to cldap_server.cVolker Lendecke2-34/+0
Only used there Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11libcli: Remove two unused functionsVolker Lendecke2-79/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11libcli: Move "struct cldap_netlogon" definition to tortureVolker Lendecke1-20/+0
This structure is only used in torture/ldap/netlogon.c now for historic reasons. Replacing it with something else would be the right thing to do... Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11libcli: Remove cldap_netlogon() and friendsVolker Lendecke2-220/+0
Replaced with netlogon_pings() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11cldap: Make cldap_netlogon.out.netlogon a pointerVolker Lendecke2-3/+10
struct netlogon_samlogon_response has subpointers, this patch enables a proper talloc hierarchy. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11lib: Fix trailing whitespaceVolker Lendecke1-2/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11cldap: Remove cldap_netlogon->in.map_responseVolker Lendecke2-5/+0
We should not pass booleans down where the caller can do the same thing with equal effort Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-10-25cldap: Save a few lines in cldap_netlogonVolker Lendecke1-14/+7
Follow recent convention to write sync wrappers Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Oct 25 09:04:11 UTC 2024 on atb-devel-224
2024-10-25cldap: Simplify cldap_netlogon with tevent_req_poll_ntstatusVolker Lendecke1-2/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2023-05-29libcli: Don’t call memcpy() with a NULL pointerJoseph Sutton1-1/+3
Doing so is undefined behaviour. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-01-10lib: Remove idtree from samba_util.hVolker Lendecke1-0/+1
No need to recompile the world when only a few files need this. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-01-10lib: Add "starting_id" to idr_get_new_random()Volker Lendecke1-2/+2
To be used in smbXsrv_open.c, for this we need a lower bound. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2022-12-14libcldap: Save lines in cldap_netlogon_create_filter() with ↵Volker Lendecke1-30/+12
talloc_asprintf_addbuf() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-05-04CVE-2020-10704: libcli ldap_message: Add search size limits to ldap_decodeGary Lockyer1-3/+15
Add search request size limits to ldap_decode calls. The ldap server uses the smb.conf variable "ldap max search request size" which defaults to 250Kb. For cldap the limit is hard coded as 4096. Credit to OSS-Fuzz REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20454 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14334 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-05-04CVE-2020-10704: lib util asn1: Add ASN.1 max tree depthGary Lockyer1-1/+1
Add maximum parse tree depth to the call to asn1_init, which will be used to limit the depth of the ASN.1 parse tree. Credit to OSS-Fuzz REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20454 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14334 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-07-16libcli/cldap: clang: Fix 'Dereference of null pointer'Noel Power1-0/+4
Fixes: libcli/cldap/cldap.c:144:8: warning: Dereference of null pointer <--[clang] ev = c->searches.list->caller.ev; ^ 1 warning generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-04-24tevent: Fix callers of tevent_req_set_endtimeVolker Lendecke1-1/+0
tevent_req_set_endtime internally already calls tevent_req_nomem and thus sets the error status correctly. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-04-04cldap: Avoid a ZERO_STRUCTPVolker Lendecke1-1/+0
This is done implicitly by tevent_req_create Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-10-18s3: cldap: cldap_multi_netlogon_send() fails with one bad IPv6 address.Jeremy Allison1-0/+5
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
2016-02-06dlist: remove unneeded type argument from DLIST_ADD_END()Michael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2016-01-06libcli: Remove a reference to asn1->ofsVolker Lendecke1-7/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-31libcli: Make sure status is initialized.Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-09-28libcli: Remove unreachable code in cldap.Andreas Schneider1-6/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-12lib/clap fix compiler warningsChristian Ambach1-2/+1
about set but unused variable Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-11libcli/cldap: Add utility to create netlogon filterBenjamin Franzke2-40/+52
This utility is splitted of from cldap_netlogon_send. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-02-19libcli/cldap: make use of samba_tevent_context_init()Stefan Metzmacher1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2011-11-10libcli/cldap/cldap.c - remove outdated commentMatthias Dieter Wallnöfer1-2/+0
Reviewed-by: metze Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Thu Nov 10 20:32:08 CET 2011 on sn-devel-104
2011-11-10libcli/cldap: fix a crash bug in cldap_socket_recv_dgram() (bug #8593)Stefan Metzmacher1-10/+25
After a calling any wrapper of tevent_req_notify_callback(), e.g. tevent_req_nterror(), tevent_req_done(), tevent_req_nomem(), a function has to return immediately otherwise it is very likely to crash, unless in calls tevent_req_defer_callback() before. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Nov 10 16:31:59 CET 2011 on sn-devel-104
2011-10-21libcli-cldap: avoid the case local == remote == NULLMatthieu Patou1-1/+5
2011-10-21libcli/cldap: make sure the local and remote address family matchesStefan Metzmacher1-5/+25
metze Signed-off-by: Matthieu Patou <mat@matws.net>
2011-10-10libcli/cldap: don't pass tevent_context to cldap_socket_init()Stefan Metzmacher2-2/+0
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Oct 10 23:23:07 CEST 2011 on sn-devel-104
2011-10-10libcli/cldap: make use of explicit tevent_contextsStefan Metzmacher1-50/+75
metze
2011-10-10libcli/cldap: pass tevent_context to cldap_search_send()Stefan Metzmacher2-4/+8
metze
2011-10-10libcli/cldap: pass tevent_context to cldap_netlogon_send()Stefan Metzmacher2-3/+5
metze
2011-10-10libcli/cldap: pass tevent_context to cldap_set_incoming_handler()Stefan Metzmacher2-1/+4
metze
2011-08-08build: provide tevent-util as a public libraryAndrew Bartlett1-1/+1
This is needed so that OpenChange can get at _tevent_req_nterr(), which is referenced by generated PIDL output. Andrew Bartlett
2011-07-26cli_cldap: Lowercase name.Jelmer Vernooij1-1/+1
2011-06-20Use tevent_req_oomVolker Lendecke1-2/+2
This fixes a few Coverity errors
2011-06-20libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbolAndrew Bartlett1-4/+4
The two error tables need to be combined, but for now seperate the names. (As the common parts of the tree now use the _common function, errmap_unix.c must be included in the s3 autoconf build). Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
2011-06-01libcli/cldap/cldap.c: don't hand huge values to tevent_timeval_add usecsRusty Russell1-2/+4
state->request.delay is two million here, resulting in an invalid timeval. Since tevent doesn't have a convenient wrapper to add arbitrary usecs, do the arithmetic here (it's the sole caller of this function). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-05-18waf-build: Add more libraries to avoid duplicate symbolsAndrew Bartlett1-5/+6
The new source of duplicates is calling libnetapi from inside smbtorture. Andrew Bartlett
2011-01-07netlogon: move netlogon helpers to ../libcli/netlogon.Günther Deschner1-1/+1
Guenther
2010-10-31s4: Remove the old perl/m4/make/mk-based build system.Jelmer Vernooij1-7/+0
The new waf-based build system now has all the same functionality, and the old build system has been broken for quite some time. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-26waf: Stop automaticaly changing dashes to underscores in library names.Jelmer Vernooij1-1/+1
2010-10-26waf: Remove lib prefix from libraries manually.Jelmer Vernooij1-1/+1
2010-10-24s4: Rename LIBCLI_LDAP to libcli_ldap.Jelmer Vernooij1-1/+1
2010-10-24s4: Rename LIBSAMBA-* to libsamba-*Jelmer Vernooij1-1/+1
2010-09-15cldap: prevent crashes when freeing cldap socketAndrew Tridgell1-6/+15
As a callback may destroy the cldap socket we need to ensure we don't reference the cldap structure after the callback Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15cldap: use ipv4 not up for unbound cldap socketsAndrew Tridgell1-1/+5
If we use "ip" we end up with a PF_INET6 socket which breaks sendto() for v4 addresses.
2010-05-18Finish removal of iconv_convenience in public API's.Jelmer Vernooij2-9/+1