From 065938ccb7bb0052746267c433637f0e05b95d85 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 17 Mar 2008 14:45:59 +0100 Subject: [PATCH] In smbstatus, mark locking.tdb and sessionid.tdb as CLEAR_IF_FIRST This is needed to inform ctdb that it's not a persistent database, with the O_RDONLY the tdb backend ignores this. Merge from 491f902098d33f in 3-0-ctdb --- source/utils/status.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/utils/status.c b/source/utils/status.c index a42c2a11e09..ffa3fbd17f9 100644 --- a/source/utils/status.c +++ b/source/utils/status.c @@ -386,7 +386,7 @@ static int traverse_sessionid(struct db_record *db, void *state) if ( show_processes ) { struct db_context *db; db = db_open(NULL, lock_path("sessionid.tdb"), 0, - TDB_DEFAULT, O_RDWR, 0644); + TDB_CLEAR_IF_FIRST, O_RDONLY, 0644); if (!db) { d_printf("sessionid.tdb not initialised\n"); } else { @@ -428,7 +428,7 @@ static int traverse_sessionid(struct db_record *db, void *state) int result; struct db_context *db; db = db_open(NULL, lock_path("locking.tdb"), 0, - TDB_DEFAULT, O_RDONLY, 0); + TDB_CLEAR_IF_FIRST, O_RDONLY, 0); if (!db) { d_printf("%s not initialised\n",