ldb: Indicate that the ltdb_dn_list_sort() in list_union is a bit subtle.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 28 May 2018 01:02:16 +0000 (13:02 +1200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 26 Jun 2018 07:19:16 +0000 (09:19 +0200)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
(cherry picked from commit 3632775d7ad31e06437ed76b8731d9895930caa1)

lib/ldb/ldb_tdb/ldb_index.c

index 674c5fc41f84eb6a18168a8d05cf25a82e532159..6da64cfa4ce26c7e470181a8def0de22e10f0ca0 100644 (file)
@@ -1120,6 +1120,9 @@ static bool list_union(struct ldb_context *ldb,
        /*
         * Sort the lists (if not in GUID DN mode) so we can do
         * the de-duplication during the merge
+        *
+        * NOTE: This can sort the in-memory index values, as list or
+        * list2 might not be a copy!
         */
        ltdb_dn_list_sort(ltdb, list);
        ltdb_dn_list_sort(ltdb, list2);