diff options
author | Aaron Haslett <aaronhaslett@catalyst.net.nz> | 2019-05-02 10:46:29 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-05-15 04:03:37 +0000 |
commit | 15f0c4969a70414ee138a1a524a60750efe590e5 (patch) | |
tree | 397d0d37bdb2561ff3e68540a58d954b288af28e /source4/torture/ldb | |
parent | 9310d9088dc21f76b7e8e5f5378ea6d5262192a0 (diff) | |
download | samba-15f0c4969a70414ee138a1a524a60750efe590e5.tar.gz |
ldb: remove unpack only attr list functionality
Unpack functions currently take an attribute list to restrict the set of
attributes to be returned in the constructed message. This
functionality is never used and complicates implementation of
forthcoming new pack format. This patch removes that functionality.
Using the unpack function then filtering the result turns
out not to be any slower.
NOTE: Configure with --abi-check-disable to build this commit. This
patch is part of a set of LDB ABI changes, and the version update is
done on the last commit.
Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'source4/torture/ldb')
-rw-r--r-- | source4/torture/ldb/ldb.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/source4/torture/ldb/ldb.c b/source4/torture/ldb/ldb.c index dfdce73d64f..bc3d0ac4b1a 100644 --- a/source4/torture/ldb/ldb.c +++ b/source4/torture/ldb/ldb.c @@ -1111,7 +1111,6 @@ static bool torture_ldb_unpack_flags(struct torture_context *torture) struct ldb_message *msg = ldb_msg_new(mem_ctx); const char *ldif_text = dda1d01d_ldif; struct ldb_ldif ldif; - unsigned int nb_elements_in_db; ldb = samba_ldb_init(mem_ctx, torture->ev, NULL, NULL, NULL); torture_assert(torture, @@ -1119,11 +1118,8 @@ static bool torture_ldb_unpack_flags(struct torture_context *torture) "Failed to init ldb"); torture_assert_int_equal(torture, - ldb_unpack_data_only_attr_list_flags(ldb, &data, - msg, - NULL, 0, - LDB_UNPACK_DATA_FLAG_NO_VALUES_ALLOC, - &nb_elements_in_db), + ldb_unpack_data_flags(ldb, &data, msg, + LDB_UNPACK_DATA_FLAG_NO_VALUES_ALLOC), 0, "ldb_unpack_data failed"); @@ -1136,11 +1132,8 @@ static bool torture_ldb_unpack_flags(struct torture_context *torture) "ldif form differs from binary form"); torture_assert_int_equal(torture, - ldb_unpack_data_only_attr_list_flags(ldb, &data, - msg, - NULL, 0, - LDB_UNPACK_DATA_FLAG_NO_DN, - &nb_elements_in_db), + ldb_unpack_data_flags(ldb, &data, msg, + LDB_UNPACK_DATA_FLAG_NO_DN), 0, "ldb_unpack_data failed"); |