summaryrefslogtreecommitdiff
path: root/lib/ldb/wscript
AgeCommit message (Collapse)AuthorFilesLines
2025-03-05ldb: remove unused sqlite backendDouglas Bagnall1-9/+0
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz> Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
2024-09-25ldb: Build lmdb backend also in non-AD caseAndreas Schneider1-13/+9
We should build with lmdb support also if it is not in AD case. The lmdb backend is also used e.g. by sssd. If you don't want to build it, you can always specify --without-ldb-lmdb BUG: https://bugzilla.samba.org/show_bug.cgi?id=15721 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Sep 25 05:36:13 UTC 2024 on atb-devel-224
2024-08-04ldb: Fix ldb public library header files being unusableJo Sutton1-1/+1
An accidental negation means that ldb_version.h is not installed when ldb is built as a public library. This is a regression introduced by commit 625fb48326ec62a33ce0abdbfb0f6f3d33d7cc64. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15690 Signed-off-by: Jo Sutton <josutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Sun Aug 4 01:35:55 UTC 2024 on atb-devel-224
2024-07-29ldb: change the version to 2.11.0 for Samba 4.22Jule Anger1-2/+2
Signed-off-by: Jule Anger <janger@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Jule Anger <janger@samba.org> Autobuild-Date(master): Mon Jul 29 10:06:23 UTC 2024 on atb-devel-224
2024-05-22ldb: add test_ldb_comparison_foldDouglas Bagnall1-0/+5
Currently this fails like this: test_ldb_comparison_fold_default_common: 118 errors out of 256 test_ldb_comparison_fold_default_ascii: 32 errors out of 100 test_ldb_comparison_fold_utf8_common: 40 errors out of 256 test_ldb_comparison_fold_utf8: 28 errors out of 100 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-03-01build: Allow --with-ldbmodulesdir to override location of LDB modulesAndrew Bartlett1-2/+2
This will allow some packagers to set this to a directory that does not mention Samba, or to put a version string in to avoid loading old modules. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01ldb: Unconditionally set LDB_PACKAGE_VERSIONAndrew Bartlett1-2/+1
This is only parsed once now and there is no confusion with the main build, so we can set it without checking. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01ldb: Remove "private_library" variable with just one userAndrew Bartlett1-3/+1
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01ldb: Rename VERSION to LDB_VERSION to avoid confusionAndrew Bartlett1-5/+5
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01lib/ldb: Remove duplicate aspects of build systemAndrew Bartlett1-44/+0
We no longer need aspects of our build that made sense for the standalone operation of LDB now that ldb is only provided as part of Samba. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01ldb: Remove remaining components of independent ldb build systemAndrew Bartlett1-26/+0
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01lib/ldb: Remove references to conf.env.standalone_ldbAndrew Bartlett1-17/+6
This is not a simple replacement as we are merging the standalone build features with the main Samba build features. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01lib/ldb: bld.CONFIG_SET(USING_SYSTEM_LDB) is now never setAndrew Bartlett1-320/+307
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01lib/ldb: Adapt pkg-config files to being build from the main build.Andrew Bartlett1-4/+2
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01lib/ldb: Always build standaloneAndrew Bartlett1-1/+1
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01build: Move --with-ldap/--without-ldap from source3 build to top levelAndrew Bartlett1-5/+0
This code impacts on LDB, which is now built from the main build so we need to combined this with the check that was in lib/ldb or else we get conflicts. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01ldb: Remove the ability for Samba to compile against a system LDBAndrew Bartlett1-32/+0
Samba will either provide the LDB to the system, or use a private ldb, we will not use any other LDB from the system. This is essentially equilvilant to the patch Debian has used for Samba 4.17 and later, named "Force-LDB-as-standalone.patch" Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01build: Remove duplicated check for -Wl,-no-undefined on OpenBSDAndrew Bartlett1-5/+0
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01ldb: Honour --private-library=!ldb as meaning build as a public libraryAndrew Bartlett1-7/+10
Likewise, let the SAMBA_LIBRARY code handle being a private library rather than in the library declaration. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01ldb: Make pyldb-util always a private libraryAndrew Bartlett1-8/+2
Only Samba has ever used these utility functions, other applications can still use our ldb python bindings, they just can not provide ldb C bindings. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01selftest: Always and only run ldb test-tdb test in Samba selftestAndrew Bartlett1-19/+0
This is the last test left in the independent ldb testsuite, removing this from there allows the test target to be removed. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01selftest: Move LDB cmocka based unit tests to Samba testsuiteAndrew Bartlett1-42/+1
This allows skip and knownfail entries to be honoured, as well as enabling the removal of the standalone LDB build system. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01ldb: Move tests to selftest/tests.py and out of standlone buildAndrew Bartlett1-23/+1
Tests that are declared in the tests.py files in the main Samba build are able to use the common knownfail, flapping and skip systems. This will also allow the independent ldb build to be removed without loss of the tests. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-01-29ldb: change the version to 2.10.0 for Samba 4.21Jule Anger1-2/+2
Signed-off-by: Jule Anger <janger@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Jule Anger <janger@samba.org> Autobuild-Date(master): Mon Jan 29 15:43:45 UTC 2024 on atb-devel-224
2024-01-29ldb: release 2.9.0 for use in Samba 4.20.xldb-2.9.0Jule Anger1-1/+1
- documentation fixes - build with Python 3.12 (bug #15513) - a lot of additional error checking in the python bindings - minor code fixes BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513 Signed-off-by: Jule Anger <janger@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2023-08-30ldb: Heed return code from Python testsuiteJoseph Sutton1-1/+1
When we added a second run of the Python testsuite, the return code from the first run began to go ignored. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-30ldb: Remove unused importJoseph Sutton1-1/+0
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-07-28ldb: change the version to 2.9.0 for Samba 4.20Jule Anger1-2/+2
Signed-off-by: Jule Anger <janger@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jul 28 11:49:02 UTC 2023 on atb-devel-224
2023-07-28ldb: release 2.8.0 for use in Samba 4.19.xldb-2.8.0Jule Anger1-1/+1
* CVE-2023-0614 Not-secret but access controlled LDAP attributes can be discovered (bug 15270) * pyldb: Raise an exception if ldb_dn_get_parent() fails * Implement ldap_whoami in pyldb and add the RFC4532 LDB_EXTENDED_WHOAMI_OID definition * Documentation and spelling fixes * Add ldb_val -> bool,uint64,int64 parsing functions * Split out ldb_val_as_dn() helper function * add LDB_CHANGETYPE_MODRDN support to ldb_ldif_to_pyobject() * add LDB_CHANGETYPE_DELETE support to ldb_ldif_to_pyobject() * let ldb_ldif_parse_modrdn() handle names without 'rdn_name=' prefix * Don't create error string if there is no error * Avoid allocation and memcpy() for every wildcard match candidate * Make ldb_msg_remove_attr O(n) * pyldb: Throw error on invalid controls * pyldb: remove py2 ifdefs * Call tevent_set_max_debug_level(TEVENT_DEBUG_TRACE) BUG: https://bugzilla.samba.org/show_bug.cgi?id=15270 Signed-off-by: Jule Anger <janger@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2023-04-05CVE-2023-0614 ldb: Add function to filter message in placeJoseph Sutton1-0/+6
At present this function is an exact duplicate of ldb_filter_attrs(), but in the next commit we shall modify it to work in place, without the need for the allocation of a second message. The test is a near duplicate of the existing test for ldb_filter_attrs(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15270 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-04-05CVE-2023-0614 ldb:tests: Ensure all tests are accounted forJoseph Sutton1-2/+3
Add ldb_filter_attrs_test to the list of tests so that it actually gets run. Remove a duplicate ldb_msg_test that was accidentally added in commit 5ca90e758ade97fb5e335029c7a1768094e70564. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15270 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-01-18ldb: change the version to 2.8.0 for Samba 4.19Stefan Metzmacher1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jule Anger <janger@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Jan 18 17:25:51 UTC 2023 on atb-devel-224
2023-01-18ldb: version 2.7.0ldb-2.7.0Stefan Metzmacher1-1/+1
* Support python 3.12 * Have python functions operating on DNs raise LdbError * don't call comparison() directly in LDB_TYPESAFE_QSORT * Use ldb_ascii_toupper() for case folding to support tr_TR.UTF-8 and other dotless i locales, see https://bugzilla.samba.org/show_bug.cgi?id=15248 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jule Anger <janger@samba.org>
2022-12-23waf: Run python tests also with tr_TR localeAndreas Schneider1-0/+7
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15248 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Dec 23 14:17:31 UTC 2022 on sn-devel-184
2022-08-08ldb: change the version to 2.7.0 for Samba 4.18Jule Anger1-2/+2
Signed-off-by: Jule Anger <janger@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Jule Anger <janger@samba.org> Autobuild-Date(master): Mon Aug 8 15:51:44 UTC 2022 on sn-devel-184
2022-07-27CVE-2022-32746 ldb: Release LDB 2.6.1ldb-2.6.1Andrew Bartlett1-1/+1
* CVE-2022-32746 Use-after-free occurring in database audit logging module (bug 15009) BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2022-01-24ldb: bump version to 2.6.0 for Samba 4.17.x releasesldb-2.6.0Stefan Metzmacher1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jule Anger <janger@samba.org> Autobuild-User(master): Jule Anger <janger@samba.org> Autobuild-Date(master): Mon Jan 24 12:15:09 UTC 2022 on sn-devel-184
2021-10-05Release ldb 2.50 for the future samba 4.16 seriesAndrew Bartlett1-2/+2
This avoids master having an older or identical LDB version to Samba 4.15.x while it gains additional changes that may not all be backported. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Oct 5 19:57:51 UTC 2021 on sn-devel-184
2021-10-05Release ldb 2.4.1Andrew Bartlett1-1/+1
* Corrected python behaviour for 'in' for LDAP attributes contained as part of ldb.Message (bug 14845) * Fix memory handling in ldb.msg_diff (bug 14836) * Corrected python docstrings BUG: https://bugzilla.samba.org/show_bug.cgi?id=14845 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14836 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14848 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-07-14ldb: version 2.4 will be used for Samba 4.15ldb-2.4.0Stefan Metzmacher1-0/+1
- Improve calculate_popt_array_length() - Use C99 initializers for builtin_popt_options[] - pyldb: Fix Message.items() for a message containing elements - pyldb: Add test for Message.items() - tests: Use ldbsearch '--scope instead of '-s' - pyldb: fix a typo - Change page size of guidindexpackv1.ldb - Use a 1MiB lmdb so the test also passes on aarch64 CentOS stream - attrib_handler casefold: simplify space dropping - fix ldb_comparison_fold off-by-one overrun - CVE-2020-27840: pytests: move Dn.validate test to ldb - CVE-2020-27840 ldb_dn: avoid head corruption in ldb_dn_explode - CVE-2021-20277 ldb/attrib_handlers casefold: stay in bounds - CVE-2021-20277 ldb tests: ldb_match tests with extra spaces - improve comments for ldb_module_connect_backend() - test/ldb_tdb: correct introductory comments - ldb.h: remove undefined async_ctx function signatures - correct comments in attrib_handers val_to_int64 - dn tests use cmocka print functions - ldb_match: remove redundant check - add tests for ldb_wildcard_compare - ldb_match: trailing chunk must match end of string - pyldb: catch potential overflow error in py_timestring - ldb: remove some 'if PY3's in tests - Add missing break in switch statement Signed-off-by: Stefan Metzmacher <metze@samba.org>
2021-03-24ldb: bump version to 2.4.0, in order to be used for Samba 4.15Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Mar 24 13:11:52 UTC 2021 on sn-devel-184
2021-03-24CVE-2020-27840: pytests: move Dn.validate test to ldbDouglas Bagnall1-0/+1
We had the test in the Samba Python segfault suite because a) the signal catching infrastructure was there, and b) the ldb tests lack Samba's knownfail mechanism, which allowed us to assert the failure. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14595 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-06-19lib/ldb: add unit test for ldb_ldap internal codeAlexander Bokovoy1-0/+14
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14413 Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2020-03-22ldb build: Remove some PEP8 warnings from wscriptGary Lockyer1-7/+7
Fix indentation of list members and fix lines > 79 characters to remove PEP8 warnings. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-03-22ldb tests: Confirm lmdb free list handlingGary Lockyer1-1/+7
Add cmocka tests to confirm lmdb's handling of the free list. As a result of lmdb's MVCC (Multiversion Concurrency Control) long running read transactions or stale readers (read transactions where the process exited without ending the transaction) can cause the database to run out of space. Items in the free list are only reused when they would not be visible in a read transaction. So long running read transactions prevent entries in the free list being reused, and the database can run out of space. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-02-26ldb: change the version to 2.2.0 for Samba 4.13Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Feb 26 23:11:39 UTC 2020 on sn-devel-184
2020-02-25ldb: version 2.1.1ldb-2.1.1Stefan Metzmacher1-1/+1
* Bug 14270: Samba 4.11 and later give incorrect results for SCOPE_ONE searches Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Tue Feb 25 12:59:02 UTC 2020 on sn-devel-184
2019-08-26ldb: Correct Pigeonhole principle validation in ldb_filter_attrs()Andrew Bartlett1-0/+5
Thankfully this only fails if the DB is corrupt and has a duplicate record. The test was at the wrong end of the loop, and was for the wrong boundary condition. A write after the end of the array would occour before the condition was hit. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13695 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-07-10ldb ABI bump for pyldb_Ldb_AsLdbContext changeDouglas Bagnall1-1/+1
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Wed Jul 10 05:48:52 UTC 2019 on sn-devel-184
2019-07-04ldb: Release ldb 2.0.5ldb-2.0.5Gary Lockyer1-1/+1
* add ldb_options_get add a function to get the options passed in ldb connect. * add "batch_mode" option. This options stops sub transactions being started for key value operations. It is intended to improve the performance in batch operations. As it bypasses the protections on operations if an operation fails, the entire transaction will be aborted by a commit. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>