diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 08:08:13 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 08:08:13 +0930 |
commit | f1a3ffe24a504f445b09269a165501439bc9da98 (patch) | |
tree | 073beec05d31b9191062b099915ab17fc0aaec2d | |
parent | 0ea5db4e0d81907ccdc25c79aa3b6f8074775426 (diff) | |
download | samba-f1a3ffe24a504f445b09269a165501439bc9da98.tar.gz samba-f1a3ffe24a504f445b09269a165501439bc9da98.tar.bz2 samba-f1a3ffe24a504f445b09269a165501439bc9da98.zip |
tdb2: log an error when calling tdb_store() on read-only TDB in tdb1 backend.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit b236a8dcc37bb864b632a2898a64f3c9bf75b4ac)
-rw-r--r-- | lib/tdb2/tdb1_tdb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/tdb2/tdb1_tdb.c b/lib/tdb2/tdb1_tdb.c index 99b83ab72d..0e3cc13cab 100644 --- a/lib/tdb2/tdb1_tdb.c +++ b/lib/tdb2/tdb1_tdb.c @@ -591,7 +591,9 @@ int tdb1_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int flag) assert(tdb->flags & TDB_VERSION1); if ((tdb->flags & TDB_RDONLY) || tdb->tdb1.traverse_read) { - tdb->last_error = TDB_ERR_RDONLY; + tdb->last_error = tdb_logerr(tdb, TDB_ERR_RDONLY, + TDB_LOG_USE_ERROR, + "tdb_store: read-only tdb"); return -1; } |