s3: Open winbindd_cache.tdb with read/write access.
authorBo Yang <boyang@samba.org>
Sun, 21 Mar 2010 08:00:26 +0000 (16:00 +0800)
committerBo Yang <boyang@samba.org>
Sun, 21 Mar 2010 08:00:26 +0000 (16:00 +0800)
Open winbindd_cache.tdb with read/write access when validate the cache,
otherwise, validation fails to get lock in tdb_check. It results in
validation failure even the cache is good.

Signed-off-by: Bo Yang <boyang@samba.org>
source3/lib/tdb_validate.c

index a1fb1850db88502949d6f865282909eb8bad66f5..b4d0365dd4fd4fdf684b8fb47ecb764b840729fa 100644 (file)
@@ -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;