1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/lib/ldb/include
Joseph Sutton f25b1756aa 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-04-05 02:10:35 +00:00
..
dlinklist.h DLIST_REMOVE: clang: Fix dereference of a null pointer warning 2019-06-11 12:10:17 +00:00
ldb_errors.h
ldb_handlers.h ldb: Expose ldb_handler_fold() funcion 2011-07-28 15:20:51 +10:00
ldb_module.h CVE-2023-0614 ldb: Make ldb_filter_attrs_in_place() work in place 2023-04-05 02:10:35 +00:00
ldb_private.h CVE-2023-0614 ldb: Add function to add distinguishedName to message 2023-04-05 02:10:35 +00:00
ldb.h lib:ldb:include: Fix code spelling 2023-04-04 07:31:36 +00:00