ldb_tdb: Do not fail in GUID index mode if there is a duplicate attribute
authorGary Lockyer <gary@catalyst.net.nz>
Tue, 27 Feb 2018 22:47:22 +0000 (11:47 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 3 Mar 2018 04:20:35 +0000 (05:20 +0100)
commit5c1504b94d1417894176811f18c5d450de22cfd2
tree04b55f2d214db6499ceeb82fb8464d97c97d907f
parent0bfbcdb69155315415867cee34d5293b1ee125fa
ldb_tdb: Do not fail in GUID index mode if there is a duplicate attribute

It is not the job of the index code to enforce this, but do give a
a warning given it has been detected.

However, now that we do allow it, we must never return the same
object twice to the caller, so filter for it in ltdb_index_filter().

The GUID list is sorted, which makes this cheap to handle, thankfully.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb/ldb_tdb/ldb_index.c