summaryrefslogtreecommitdiff
path: root/lib/dbwrap
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2014-01-28 12:42:31 +0100
committerStefan Metzmacher <metze@samba.org>2014-02-07 16:06:07 +0100
commit44c66435bafc786f8a4c10e3652c7de168f642b1 (patch)
tree38ce7f675b80dbc67db8221bfdaa7de398eb1b25 /lib/dbwrap
parent31c233651972c94b66d7cebf42ebcdcb43c39036 (diff)
downloadsamba-44c66435bafc786f8a4c10e3652c7de168f642b1.tar.gz
dbwrap: explicitly use DBWRAP_LOCK_ORDER_NONE in tdb->ntdb conversion
Make lack of lock order checking more visible. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/dbwrap')
-rw-r--r--lib/dbwrap/dbwrap_local_open.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/dbwrap/dbwrap_local_open.c b/lib/dbwrap/dbwrap_local_open.c
index a6f494e313d..6e40139962b 100644
--- a/lib/dbwrap/dbwrap_local_open.c
+++ b/lib/dbwrap/dbwrap_local_open.c
@@ -103,7 +103,8 @@ static bool tdb_to_ntdb(TALLOC_CTX *ctx, struct loadparm_context *lp_ctx,
return false;
}
tdb = db_open_tdb(ctx, lp_ctx, tdbname, 0,
- TDB_DEFAULT, O_RDONLY, 0, 0, DBWRAP_FLAG_NONE);
+ TDB_DEFAULT, O_RDONLY, 0, DBWRAP_LOCK_ORDER_NONE,
+ DBWRAP_FLAG_NONE);
if (!tdb) {
DEBUG(0, ("tdb_to_ntdb: could not open %s: %s\n",
tdbname, strerror(errno)));
@@ -111,7 +112,8 @@ static bool tdb_to_ntdb(TALLOC_CTX *ctx, struct loadparm_context *lp_ctx,
}
ntdb = db_open_ntdb(ctx, lp_ctx, ntdbname, dbwrap_hash_size(tdb),
TDB_DEFAULT, O_RDWR|O_CREAT|O_EXCL,
- st.st_mode & 0777, 0, DBWRAP_FLAG_NONE);
+ st.st_mode & 0777, DBWRAP_LOCK_ORDER_NONE,
+ DBWRAP_FLAG_NONE);
if (!ntdb) {
DEBUG(0, ("tdb_to_ntdb: could not create %s: %s\n",
ntdbname, strerror(errno)));