From cf0cb0add9ed47b8974272237fee0e1a4ba7bf68 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 27 Jan 2014 14:49:12 +0100 Subject: dbwrap: add a dbwrap_flags argument to db_open() This is in preparation to support handing flags to backends, in particular activating read only record support for ctdb databases. For a start, this does nothing but adding the parameter, and all databases use DBWRAP_FLAG_NONE. Signed-off-by: Michael Adam Reviewed-by: Stefan Metzmacher --- source3/passdb/account_pol.c | 4 ++-- source3/passdb/pdb_tdb.c | 6 +++--- source3/passdb/secrets.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/passdb') diff --git a/source3/passdb/account_pol.c b/source3/passdb/account_pol.c index 06925e8af66..5f2c7ab2eb6 100644 --- a/source3/passdb/account_pol.c +++ b/source3/passdb/account_pol.c @@ -220,13 +220,13 @@ bool init_account_policy(void) } db = db_open(NULL, state_path("account_policy.tdb"), 0, TDB_DEFAULT, - O_RDWR, 0600, DBWRAP_LOCK_ORDER_1); + O_RDWR, 0600, DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE); if (db == NULL) { /* the account policies files does not exist or open * failed, try to create a new one */ db = db_open(NULL, state_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600, - DBWRAP_LOCK_ORDER_1); + DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE); if (db == NULL) { DEBUG(0,("Failed to open account policy database\n")); return False; diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index f256e6c7fb3..162083f9c70 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -226,7 +226,7 @@ static bool tdbsam_convert_backup(const char *dbname, struct db_context **pp_db) tmp_db = db_open(NULL, tmp_fname, 0, TDB_DEFAULT, O_CREAT|O_RDWR, 0600, - DBWRAP_LOCK_ORDER_1); + DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE); if (tmp_db == NULL) { DEBUG(0, ("tdbsam_convert_backup: Failed to create backup TDB passwd " "[%s]\n", tmp_fname)); @@ -293,7 +293,7 @@ static bool tdbsam_convert_backup(const char *dbname, struct db_context **pp_db) orig_db = db_open(NULL, dbname, 0, TDB_DEFAULT, O_CREAT|O_RDWR, 0600, - DBWRAP_LOCK_ORDER_1); + DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE); if (orig_db == NULL) { DEBUG(0, ("tdbsam_convert_backup: Failed to re-open " "converted passdb TDB [%s]\n", dbname)); @@ -444,7 +444,7 @@ static bool tdbsam_open( const char *name ) /* Try to open tdb passwd. Create a new one if necessary */ db_sam = db_open(NULL, name, 0, TDB_DEFAULT, O_CREAT|O_RDWR, 0600, - DBWRAP_LOCK_ORDER_1); + DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE); if (db_sam == NULL) { DEBUG(0, ("tdbsam_open: Failed to open/create TDB passwd " "[%s]\n", name)); diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index f97510db211..9d91c2f3d3b 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -79,7 +79,7 @@ bool secrets_init_path(const char *private_dir, bool use_ntdb) db_ctx = db_open(NULL, fname, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600, - DBWRAP_LOCK_ORDER_1); + DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE); if (db_ctx == NULL) { DEBUG(0,("Failed to open %s\n", fname)); -- cgit