summaryrefslogtreecommitdiff
path: root/libcli/ldap
AgeCommit message (Collapse)AuthorFilesLines
2026-02-25libcli: Avoid a talloc in ldap_encode_ndr_dom_sid()Volker Lendecke1-4/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2026-01-07lib: Don't call a function to initialize an empty DATA_BLOBVolker Lendecke1-4/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-07libcli: Add missing NULL checksVolker Lendecke1-0/+11
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-07libcli: Fix error path memleaksVolker Lendecke1-0/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-11-24libcli:ldap: Do not declare cm_print_error()Andreas Schneider1-5/+0
This is part of the cmocka.h header file. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-10-17Add missing include needed for cmocka.hAndreas Schneider1-0/+1
This will be required in future. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2024-03-12lib: Make GUID_to_ndr_buf() return voidVolker Lendecke1-5/+1
The whole point of struct GUID_ndr_buf is that this never fails. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-25libcli/util: add struct tstream_context to tstream_read_pdu_blob_full_fn_tRalph Boehme2-2/+9
Add struct tstream_context to tstream_read_pdu_blob_full_fn_t and update all callers of tstream_read_pdu_blob_send() to use the correct callback. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-08libcli/ldap: Don’t try to encode NULL nameJoseph Sutton1-0/+3
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-04-27libcli:ldap: Fix code spellingAndreas Schneider1-2/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2020-10-02libcli: Use GUID_to_ndr_buf() in ldap_encode_ndr_GUID()Volker Lendecke1-3/+3
Avoid a talloc/free Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-08-06libcli/ldap: Fix CID 1462695 Resource leakVolker Lendecke1-0/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-08-06libcli/ldap: Fix CID 1462696 Resource leakVolker Lendecke1-0/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-08-06libcli/ldap: Fix CID 1465278 Resource leakVolker Lendecke1-0/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-07-09libcli/ldap: Fix decoding struct ldap_ExtendedResponseVolker Lendecke1-2/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2020-07-09libcli/ldap: Test decoding an exop responseVolker Lendecke2-0/+43
ldap-starttls-response.dat is a reply to a starttls extended operation. Right now ldap_decode() does not handle this correctly. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2020-06-23libcli ldap tests: remove use of zero length arrayGary Lockyer1-1/+1
libcli/ldap/tests/ldap_message_test.c defines a zero length array (uint8_t buf[0]), which is a GCC extension and breaks the build with some strict compilers like xlc. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14387 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Jun 23 02:15:35 UTC 2020 on sn-devel-184
2020-05-04CVE-2020-10704 libcli ldap: Check search request lengths.Gary Lockyer1-0/+4
Check the search request lengths against the limits passed to ldap_decode. 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> Autobuild-User(master): Gary Lockyer <gary@samba.org> Autobuild-Date(master): Mon May 4 04:40:10 UTC 2020 on sn-devel-184
2020-05-04CVE-2020-10704: libcli ldap_message: Add search size limits to ldap_decodeGary Lockyer3-4/+26
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: libcli ldap: test recursion depth in ldap_decode_filter_treeGary Lockyer4-0/+286
Add tests to check that ASN.1 ldap requests with deeply nested elements are rejected. Previously there was no check on the on the depth of nesting and excessive nesting could cause a stack overflow. 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>
2016-05-06typo: mplementation => implementationGarming Sam3-3/+3
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2016-03-09ASN1: use a talloc context in read_contextSimpleDouglas Bagnall1-5/+5
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-02-03ldap: Correctly check asn1_tag_remaining retvalVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2016-01-13Rename 'errors' to 'samba-errors' and make it public.Jelmer Vernooij1-1/+1
This is necessary because it has public headers. Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk> Reviewed-By: Andrew Bartlett <abartlet@samba.org> Reviewed-By: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Wed Jan 13 07:47:04 CET 2016 on sn-devel-144
2016-01-13libcli: Make headers for private libraries private.Jelmer Vernooij1-3/+2
Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk> Reviewed-By: Andrew Bartlett <abartlet@samba.org> Reviewed-By: Stefan Metzmacher <metze@samba.org>
2016-01-06lib: Use asn1_has_nestingVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2016-01-06lib: Use asn1_extract_blob()Volker Lendecke1-1/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2016-01-06lib: Use asn1_has_error()Volker Lendecke1-7/+11
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2016-01-06asn1: Make asn1_peek_full_tag return 0/errnoVolker Lendecke1-1/+8
We don't need the full power of NTSTATUS here. This was the only NTSTATUS in asn1.h, so I think it's worth removing it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-10-14libdap: Fix a '\0' vs NULL mixupVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-06-16lib: ldap: Properly check talloc error returns.Jeremy Allison1-1/+10
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jun 16 04:16:13 CEST 2015 on sn-devel-104
2014-11-17samba: pass down size_t instead of int to add_string_to_array().Günther Deschner1-1/+1
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Mon Nov 17 19:53:22 CET 2014 on sn-devel-104
2014-09-26s4: libcli: ldap message - Ensure all asn1_XX returns are checked.Jeremy Allison2-391/+397
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep 26 03:15:00 CEST 2014 on sn-devel-104
2013-06-24libcli/ldap: Cope with substring match with no chunks in ldap_push_filterAndrew Bartlett1-18/+21
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2012-05-19libcli: make it easier to understand that a control was not correctly encodedMatthieu Patou1-1/+1
2011-10-07ldb: use ldb directly rather than via a copyAndrew Bartlett2-8/+0
This avoids needing to manually sync the two files, which due to the top level build must be API compatible at all times anyway. The most important recent change was: commit e3b76bd6205acfc1a89fbcab5d9588b32cb47b88 Author: Andrew Tridgell <tridge@samba.org> Date: Thu Jul 28 15:51:31 2011 +1000 ldb: fixed a search expression parse bug However, as we always control the search expression in the callers to this code, no backport to other releases is required. Andrew Bartlett
2011-06-10libcli/ldap/ldap_ndr.h: fix licence/copyrightGünther Deschner1-0/+22
Guenther
2011-04-14libcli/ldap Re-add ldap_ndr.h as a public headerAndrew Bartlett1-1/+1
as noticed by Brad Hards Andrew Bartlett
2011-04-13libcli/ldap pull LIBCLI_LDAP_MESSAGE and LIBCLI_LDAP_NDR into a libraryAndrew Bartlett1-14/+6
This reduces symbol duplication Andrew Bartlett
2011-04-06lib: make asn1_util a private libraryAndrew Tridgell1-1/+1
this prevents symbol duplication of the asn1 symbols in the service and ntvfs subsystems Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-20ldapcli: allocate control value on the control object not on the control ↵Matthieu Patou1-2/+2
container
2011-02-10ldb: use #include <ldb.h> for ldbAndrew Tridgell2-2/+2
thi ensures we are using the header corresponding to the version of ldb we're linking against. Otherwise we could use the system ldb for link and the in-tree one for include Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-24libcli/ldap: use lib/ldb_compat.h for the s3 buildStefan Metzmacher1-0/+4
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Jan 24 14:55:50 CET 2011 on sn-devel-104
2010-10-31s4: Remove the old perl/m4/make/mk-based build system.Jelmer Vernooij1-15/+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: Remove lib prefix from libraries manually.Jelmer Vernooij1-2/+2
2010-10-26s4: Drop duplicate 'lib' prefix for private libraries.Jelmer Vernooij1-2/+2
2010-10-24s4: Rename LIBSAMBA-* to libsamba-*Jelmer Vernooij1-4/+4
2010-10-21s4-waf: removed dependencies on missing subsystemsAndrew Tridgell1-1/+1
these were left over from the old config.mk system
2010-10-20libcli/ldap Don't try and encode a control with a NULL OIDAndrew Bartlett1-0/+6
ctrl->oid is set to NULL by the Samba4 rootDSE module when removing controls that should not be exposed over LDAP (to avoid a realloc). Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Oct 20 04:13:44 UTC 2010 on sn-devel-104