ldb_tdb: Ensure we can not commit an index that is corrupt due to partial re-index
authorAndrew Bartlett <abartlet@samba.org>
Mon, 26 Mar 2018 03:01:13 +0000 (16:01 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 5 Apr 2018 02:50:16 +0000 (04:50 +0200)
commite481e4f30f4dc540f6f129b4f2faea48ee195673
tree18ef67b439e33ebd0219c1ca6fa4418ad069e544
parent1452677ef0044815df0702de5424d4711e18144b
ldb_tdb: Ensure we can not commit an index that is corrupt due to partial re-index

The re-index traverse can abort part-way though and we need to ensure
that the transaction is never committed as that will leave an un-useable db.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13335

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