From ea1ff9e524e8699ab4b67a52907ae41c7946aa87 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 27 Jul 2010 01:54:01 -0700 Subject: [PATCH] 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. --- source3/lib/tdb_validate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/source3/lib/tdb_validate.c b/source3/lib/tdb_validate.c index a1fb185..b4d0365 100644 --- a/source3/lib/tdb_validate.c +++ b/source3/lib/tdb_validate.c @@ -192,7 +192,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; -- 1.7.0.4