1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-06 13:18:07 +03:00
samba-mirror/lib/ldb/tests
Joseph Sutton 4addeaaf5d CVE-2023-0614 ldb: Make ldb_filter_attrs_in_place() work in place
ldb_filter_attrs() previously did too much. Now its replacement,
ldb_filter_attrs_in_place(), only does the actual filtering, while
taking ownership of each element's values is handled in a separate
function, ldb_msg_elements_take_ownership().

Also, ldb_filter_attrs_in_place() no longer adds the distinguishedName
to the message if it is missing. That is handled in another function,
ldb_msg_add_distinguished_name().

As we're now modifying the original message rather than copying it into
a new one, we no longer need the filtered_msg parameter.

We adapt a test, based on ldb_filter_attrs_test, to exercise the new
function.

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-03-20 10:03:38 +01:00
..
python pyldb: Add tests for ldb.Message containment testing 2021-09-28 09:44:35 +00:00
schema-tests
guidindexpackv1.ldb lib:ldb: Change page size of guidindexpackv1.ldb 2021-04-23 08:26:00 +00:00
init_slapd.sh
init.ldif
kill_slapd.sh
ldapi_url.sh
ldb_filter_attrs_in_place_test.c CVE-2023-0614 ldb: Make ldb_filter_attrs_in_place() work in place 2023-03-20 10:03:38 +01:00
ldb_filter_attrs_test.c CVE-2023-0614 ldb:tests: Ensure ldb_val data is zero-terminated 2023-03-20 10:03:37 +01:00
ldb_key_value_sub_txn_mdb_test.valgrind lib ldb ldb_key_value tests: Add tests for wrapped operations 2019-06-21 04:27:12 +00:00
ldb_key_value_sub_txn_test.c lib/ldb/tests: include stdint.h before cmocka.h 2019-12-18 15:32:40 +00:00
ldb_key_value_test.c ldb_key_value_test: studio compiler doesn't like empty struct definitions 2020-11-10 06:53:43 +00:00
ldb_kv_ops_test.c Fix FTBFS / Increase the over-estimation for sparse files 2020-08-25 04:23:19 +00:00
ldb_kv_ops_test.valgrind lib ldb ldb_key_value tests: Add tests for wrapped operations 2019-06-21 04:27:12 +00:00
ldb_lmdb_free_list_test.c lib:ldb: Use a 1MiB lmdb so the test also passes on aarch64 CentOS stream 2021-04-23 07:35:32 +00:00
ldb_lmdb_size_test.c lib/ldb/tests: include stdint.h before cmocka.h 2019-12-18 15:32:40 +00:00
ldb_lmdb_test.c lib/ldb/tests: include stdint.h before cmocka.h 2019-12-18 15:32:40 +00:00
ldb_match_test.c ldb/attrib_handler casefold: simplify space dropping 2021-04-07 03:16:39 +00:00
ldb_match_test.valgrind CVE-2019-3824 ldb: Add tests for ldb_wildcard_match 2019-02-25 21:26:12 +01:00
ldb_mod_op_test.c Fix clang 9 format-nonliteral warnings 2020-05-08 09:31:31 +00:00
ldb_msg.c Fix uClibc build on 64bit platforms by including stdint.h 2018-08-24 17:22:09 +02:00
ldb_no_lmdb_test.c lib/ldb/tests: include stdint.h before cmocka.h 2019-12-18 15:32:40 +00:00
ldb_parse_test.c ldb_parse_test: studio compiler doesn't like empty struct definitions 2020-11-10 06:53:43 +00:00
ldb_tdb_test.c ldb/test/ldb_tdb: correct introductory comments 2021-03-17 05:57:34 +00:00
lldb_ldap.c lib/ldb: add unit test for ldb_ldap internal code 2020-06-19 07:16:37 +00:00
photo.ldif
samba4.png
sample_module.c
slapd.conf
start_slapd.sh
test_ldb_dn.c ldb: dn tests use cmocka print functions 2021-03-10 09:51:25 +00:00
test_ldb_qsort.c Fix uClibc build on 64bit platforms by including stdint.h 2019-05-19 17:34:20 +00:00
test-attribs.ldif
test-config.ldif
test-controls.sh
test-default-config.ldif
test-dup-2.ldif
test-dup.ldif
test-extended.sh
test-generic.sh tests: Use ldbsearch '--scope instead of '-s' 2021-04-28 03:43:34 +00:00
test-index.ldif
test-ldap.sh
test-modify-modrdn.ldif
test-modify-unmet-2.ldif
test-modify-unmet.ldif
test-modify.ldif
test-schema.sh
test-soloading.sh
test-sqlite3.sh
test-tdb-features.sh tests: Use ldbsearch '--scope instead of '-s' 2021-04-28 03:43:34 +00:00
test-tdb-subunit.sh
test-tdb.sh
test-wildcard.ldif
test-wrong_attributes.ldif
test.ldif
testdata.txt
testsearch.txt