diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-06-20 14:48:36 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-06-20 14:48:36 +0000 |
commit | 85cc64731c554d7f5e921b2635484c89d56659d6 (patch) | |
tree | f765aa275ede86d822484c9c02460c21fefb0db0 | |
parent | 1b2773240443e70fccbc40f2ce83760b1081228a (diff) | |
download | samba-85cc64731c554d7f5e921b2635484c89d56659d6.tar.gz samba-85cc64731c554d7f5e921b2635484c89d56659d6.tar.bz2 samba-85cc64731c554d7f5e921b2635484c89d56659d6.zip |
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)
-rw-r--r-- | source3/tdb/tdb.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |