dbwrap: explicitly use DBWRAP_LOCK_ORDER_NONE in tdb->ntdb conversion
authorMichael Adam <obnox@samba.org>
Tue, 28 Jan 2014 11:42:31 +0000 (12:42 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 7 Feb 2014 15:06:07 +0000 (16:06 +0100)
Make lack of lock order checking more visible.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/dbwrap/dbwrap_local_open.c

index a6f494e313d80e5b9f31d6ffa1ec04352a28287d..6e40139962ba70e30d57b7c1cfacfe0f5afd4e08 100644 (file)
@@ -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)));