Fix propagation of LDB errors through TDB.
authorAdrian Cochrane <adrianc@catalyst.net.nz>
Thu, 3 Dec 2015 03:30:59 +0000 (16:30 +1300)
committerGarming Sam <garming@samba.org>
Fri, 4 Dec 2015 05:08:29 +0000 (06:08 +0100)
commitc505076422522f2b61bb7397d8dc56d309ce4570
treed15a0fe7eae42061fcb2b112cd0f8147a2b51ed4
parent99b2fd4f5be9dca1ef66c8a8096e3e75fee84a7f
Fix propagation of LDB errors through TDB.

Returning a non-zero value from a tdb_traverse callback indicates that tdb_traverse
should stop traversing the database. This error code IS NOT propagated back to the
caller, so LTDB must record the error otherwise. This patch corrects LTDB for this
misunderstanding.

Naturally exposing these errors changes the behaviour of some tests. This commit fixes
that as well.

Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb-samba/tests/match_rules.py
lib/ldb/ldb_tdb/ldb_search.c
lib/ldb/ldb_tdb/ldb_tdb.h
selftest/knownfail