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 | f327c06108cd1a9146f4c24aa4274997be0b4fb4 (patch) | |
tree | 60dfca5b367a7b901f7c973af8fcb4963dd579e3 /source/tdb | |
parent | 81abfec7faf8675391d017c2e4160cd77a1ab157 (diff) | |
download | samba-f327c06108cd1a9146f4c24aa4274997be0b4fb4.tar.gz samba-f327c06108cd1a9146f4c24aa4274997be0b4fb4.tar.xz samba-f327c06108cd1a9146f4c24aa4274997be0b4fb4.zip |
fixed a bug found by volker
when we are traversing a readonly dababase we should not try to
cleanup the pending-delete records
Diffstat (limited to 'source/tdb')
-rw-r--r-- | source/tdb/tdb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c index c414ae0d310..34681ea78f2 100644 --- a/source/tdb/tdb.c +++ b/source/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); |