summaryrefslogtreecommitdiff
path: root/source3/lib/tldap_util.c
AgeCommit message (Collapse)AuthorFilesLines
2025-02-13s3:tldap: avoid using talloc_tos()Stefan Metzmacher1-16/+25
Async code should never use it without creating its own stackframe! Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2020-08-03lib: relicense smb_strtoul(l) under LGPLv3Ralph Boehme1-0/+1
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Aug 3 22:21:04 UTC 2020 on sn-devel-184
2020-05-04CVE-2020-10704: lib util asn1: Add ASN.1 max tree depthGary Lockyer1-2/+2
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-08-01tldap: Paged searches fail when they get to the endGarming Sam1-1/+2
The normal case hit the goto label, and should have just returned. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=14029
2019-08-01tldap: Make memcpy of no controls safeGarming Sam1-1/+3
Static analyzers sometimes complain about this case. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=14029
2019-06-30source3: Update all consumers of strtoul_err(), strtoull_err() to new APISwen Schillig1-1/+1
Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
2019-03-12lib: Remove "struct sid_parse_ret" againVolker Lendecke1-2/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-03-12lib: Make sid_parse return the parsed lengthVolker Lendecke1-1/+3
Use a temporary struct as a return value to make the compiler catch all callers. If we just changed bool->ssize_t, this would just generate a warning. struct sid_parse_ret will go away in the next commit Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-03-01lib: Use wrapper for string to integer conversionSwen Schillig1-1/+10
In order to detect an value overflow error during the string to integer conversion with strtoul/strtoull, the errno variable must be set to zero before the execution and checked after the conversion is performed. This is achieved by using the wrapper function strtoul_err and strtoull_err. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-02-06tldap: avoid more use after free errorsRalph Boehme1-2/+0
See the previous commit for an explanation. :) Bug: https://bugzilla.samba.org/show_bug.cgi?id=13776 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Feb 6 10:19:12 CET 2019 on sn-devel-144
2018-02-20tldap: Dump unnecessary includesVolker Lendecke1-2/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2016-05-04lib: Give base64.c its own .hVolker Lendecke1-0/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-03tldap: Make tldap_search use tldap_search_allVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2016-02-03lib: Introduce TLDAPRCVolker Lendecke1-54/+48
Make ldap return codes type safe Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2015-08-26lib: Make sid_parse take a uint8_tVolker Lendecke1-1/+1
sid_parse takes a binary blob, uint8_t reflects this a bit better than char * does Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-09-26s3: tldap_util: Ensure all asn1_XX returns are checked.Jeremy Allison1-20/+23
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2013-02-19s3:lib: make use of samba_tevent_context_init()Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2011-12-20s3: Fix some False/NULL hickupsVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Dec 20 13:13:17 CET 2011 on sn-devel-104
2011-05-18s3-lib Replace StrCaseCmp() with strcasecmp_m()Andrew Bartlett1-1/+1
strcasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
2011-05-06More const fixes. Remove CONST_DISCARD.Jeremy Allison1-1/+1
2011-04-06s3: Fix tldap_make_mod_blob_int() debug messagesSumit Bose1-3/+3
Signed-off-by: Günther Deschner <gd@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Apr 6 13:10:30 CEST 2011 on sn-devel-104
2011-03-31s3-libndr: add ../librpc/ndr/libndr.h include in some places.Günther Deschner1-0/+1
Guenther
2011-03-24charcnv: removed the allow_badcharcnv and allow_bad_conv options to ↵Andrew Tridgell1-5/+4
convert_string*() we shouldn't accept bad multi-byte strings, it just hides problems Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
2011-03-16s3-build: only include asn1 headers where actually needed.Günther Deschner1-0/+1
Guenther
2011-03-14s3: Change tldap_entry_attributes to the "array,count" conventionVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Mon Mar 14 22:02:35 CET 2011 on sn-devel-104
2011-02-20s3: Protect tldap_errstr against a NULL ldVolker Lendecke1-1/+3
2011-02-13s3: Convert tldap_entry_values args to "array, count"Volker Lendecke1-4/+4
2011-02-13s3: Add an explicit counter to tldap_add_mod_[blobs|str]Volker Lendecke1-8/+12
2011-02-13s3: Convert tldap_make_mod_fmt args to "array, count"Volker Lendecke1-1/+1
2011-02-13s3: Convert tldap_make_mod_blob args to "array, count"Volker Lendecke1-1/+1
2011-02-13s3: Convert tldap_make_mod_blob_int args to "array, count"Volker Lendecke1-3/+3
2011-02-13s3: Convert tldap_add_blob_vals args to "array, count"Volker Lendecke1-2/+2
2011-02-13s3: Convert tldap_add_mod_blobs args to "array, count"Volker Lendecke1-5/+6
2010-10-12libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett1-0/+1
This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-05-18s3-tldap: only include tldap when actually needed.Günther Deschner1-0/+2
Guenther
2009-07-04Add tldap_pull_guidVolker Lendecke1-0/+11
2009-07-03tldap: Do not do a return before we got the search_resultVolker Lendecke1-1/+0
2009-06-28Add tldap_search_vaVolker Lendecke1-8/+20
2009-06-20Add tldap paged searches, together with two helper routinesVolker Lendecke1-0/+261
2009-06-20Reorganize retrieving errors and server-sent controlsVolker Lendecke1-1/+1
This attaches the data to the tldap_message instead of the tevent_req. It adds tldap_ctx_lastmsg() to retrieve the last message for the users of the sync wrappers.
2009-06-20Add tldap_supports_controlVolker Lendecke1-0/+11
2009-06-20Add tldap_entry_has_attrvalueVolker Lendecke1-0/+18
2009-06-20Prepare control supportVolker Lendecke1-2/+2
We will have arrays of controls passed to tldap.c. Follow a mantra from the classic book "Thinking Forth" by Leo Brodie: Favor counts over terminators :-) This makes the parameter lists to tldap pretty long, but everyone will have wrapper routines anyway, see for example tldap_search_fmt. And the OpenLDAP manpages call the non-_ext routines deprecated, probably for a reason.
2009-06-19Add tldap_fetch_rootdseVolker Lendecke1-0/+131
2009-06-08Add tlda_add_mod_strVolker Lendecke1-0/+17
2009-06-07Add tldap_pull_uint32Volker Lendecke1-0/+12
2009-06-06Add some samba-style tldap utility functionsVolker Lendecke1-0/+351