summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-07-27 01:54:01 -0700
committerKarolin Seeger <kseeger@samba.org>2011-01-13 17:58:51 +0100
commitbd20f12ae607751e7c0ceed197c8a290876a5d93 (patch)
tree51675473e230263daaf6d28ee61fcbc70095f298
parent97f779df539808cb2b08cbfb2f39f4e375bcd9ac (diff)
downloadsamba-bd20f12ae607751e7c0ceed197c8a290876a5d93.tar.gz
Fix bug 7590 - offline login fails because winbind deletes cache on every startup.
Sync lib/tdb_validate.c with the change in current master. Change tdb_validate_open() to always use O_RDWR instead of O_RDONLY, as (from the bug report): "db_check() will always return failure for a read-only database. Silently, without any log output, when _tdb_lockall() fails." Jeremy. (cherry picked from commit 39cb903463d8a3fcabd9e148112bf5cf81744130) (cherry picked from commit 9812b1a601c9ccc2a3e6c06b98c32730a32c787a)
-rw-r--r--source3/lib/tdb_validate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/tdb_validate.c b/source3/lib/tdb_validate.c
index 092546e3eb5..5f9e155ea14 100644
--- a/source3/lib/tdb_validate.c
+++ b/source3/lib/tdb_validate.c
@@ -181,7 +181,7 @@ int tdb_validate_open(const char *tdb_path, tdb_validate_data_func validate_fn)
DEBUG(5, ("tdb_validate_open called for tdb '%s'\n", tdb_path));
- tdb = tdb_open_log(tdb_path, 0, TDB_DEFAULT, O_RDONLY, 0);
+ tdb = tdb_open_log(tdb_path, 0, TDB_DEFAULT, O_RDWR, 0);
if (!tdb) {
DEBUG(1, ("Error opening tdb %s\n", tdb_path));
return ret;