diff options
-rw-r--r-- | source3/tdb/tdb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c index 20f51402dc..e0df7ca020 100644 --- a/source3/tdb/tdb.c +++ b/source3/tdb/tdb.c @@ -750,6 +750,8 @@ static int do_delete(TDB_CONTEXT *tdb, tdb_off rec_ptr, struct list_struct*rec) tdb_off last_ptr, i; struct list_struct lastrec; + if (tdb->read_only) return -1; + if (write_lock_record(tdb, rec_ptr) == -1) { /* Someone traversing here: mark it as dead */ rec->magic = TDB_DEAD_MAGIC; |