summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-12-11 06:10:32 +0000
committerJeremy Allison <jra@samba.org>2000-12-11 06:10:32 +0000
commit9e9961d2db041ed742eb5f8fdee7252e622860b2 (patch)
tree7ab81c05b989f7841af4dedade3c9ab0d763477f
parent0961ed2b56ad9c7eb5e5409d87617703472b6ec7 (diff)
downloadsamba-9e9961d2db041ed742eb5f8fdee7252e622860b2.tar.gz
samba-9e9961d2db041ed742eb5f8fdee7252e622860b2.tar.bz2
samba-9e9961d2db041ed742eb5f8fdee7252e622860b2.zip
Added Tim's fix for read-only crashes.
Jeremy. (This used to be commit cfc62fecdf4c5579ee643df3e701cf6f1fe553ee)
-rw-r--r--source3/tdb/tdb.c2
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;