summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_tdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb/pdb_tdb.c')
-rw-r--r--source3/passdb/pdb_tdb.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index 01c0def57f..a090fcd5bb 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -224,7 +224,8 @@ static bool tdbsam_convert_backup(const char *dbname, struct db_context **pp_db)
* it to stay around after we return from here. */
tmp_db = db_open(NULL, tmp_fname, 0,
- TDB_DEFAULT, O_CREAT|O_RDWR, 0600);
+ TDB_DEFAULT, O_CREAT|O_RDWR, 0600,
+ DBWRAP_LOCK_ORDER_1);
if (tmp_db == NULL) {
DEBUG(0, ("tdbsam_convert_backup: Failed to create backup TDB passwd "
"[%s]\n", tmp_fname));
@@ -290,7 +291,8 @@ static bool tdbsam_convert_backup(const char *dbname, struct db_context **pp_db)
/* re-open the converted TDB */
orig_db = db_open(NULL, dbname, 0,
- TDB_DEFAULT, O_CREAT|O_RDWR, 0600);
+ TDB_DEFAULT, O_CREAT|O_RDWR, 0600,
+ DBWRAP_LOCK_ORDER_1);
if (orig_db == NULL) {
DEBUG(0, ("tdbsam_convert_backup: Failed to re-open "
"converted passdb TDB [%s]\n", dbname));
@@ -440,7 +442,8 @@ 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);
+ db_sam = db_open(NULL, name, 0, TDB_DEFAULT, O_CREAT|O_RDWR, 0600,
+ DBWRAP_LOCK_ORDER_1);
if (db_sam == NULL) {
DEBUG(0, ("tdbsam_open: Failed to open/create TDB passwd "
"[%s]\n", name));