CVE-2023-0614 ldb: Make use of ldb_filter_attrs_in_place()
commit4bbdd6709bfe2ba31cee8968751a48a6d454f19e
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Sun, 26 Feb 2023 21:31:52 +0000 (27 10:31 +1300)
committerJule Anger <janger@samba.org>
Mon, 20 Mar 2023 09:03:38 +0000 (20 10:03 +0100)
treedc0a2031fd1e13180453759251b9f6ab426a10d1
parent4addeaaf5da96ac8f620a0c27c2a576b17747dd2
CVE-2023-0614 ldb: Make use of ldb_filter_attrs_in_place()

Change all uses of ldb_kv_filter_attrs() to use
ldb_filter_attrs_in_place() instead. This function does less work than
its predecessor, and no longer requires the allocation of a second ldb
message. Some of the work is able to be split out into separate
functions that each accomplish a single task, with a purpose to make the
code clearer.

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>
lib/ldb/ldb_key_value/ldb_kv.h
lib/ldb/ldb_key_value/ldb_kv_index.c
lib/ldb/ldb_key_value/ldb_kv_search.c
source4/torture/ldb/ldb.c