From 85cc64731c554d7f5e921b2635484c89d56659d6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 20 Jun 2003 14:48:36 +0000 Subject: fixed a bug found by volker when we are traversing a readonly dababase we should not try to cleanup the pending-delete records (This used to be commit f327c06108cd1a9146f4c24aa4274997be0b4fb4) --- source3/tdb/tdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/tdb') diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c index c414ae0d31..34681ea78f 100644 --- a/source3/tdb/tdb.c +++ b/source3/tdb/tdb.c @@ -1257,7 +1257,8 @@ static int tdb_next_lock(TDB_CONTEXT *tdb, struct tdb_traverse_lock *tlock, /* Try to clean dead ones from old traverses */ current = tlock->off; tlock->off = rec->next; - if (do_delete(tdb, current, rec) != 0) + if (!tdb->read_only && + do_delete(tdb, current, rec) != 0) goto fail; } tdb_unlock(tdb, tlock->hash, F_WRLCK); -- cgit