]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
g_lock: open with LOCK_ORDER_3
authorVolker Lendecke <vl@samba.org>
Wed, 14 Jun 2017 11:57:56 +0000 (13:57 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 15 Jun 2017 11:19:15 +0000 (13:19 +0200)
xattr_tdb needs g_lock in a clustered environment. Nobody else
uses LOCK_ORDER_3 at this moment, so this looks safe.

The last one to use this was dbwrap_watch.tdb, and that's gone. The only
other one was notify_index.tdb, and that's gone too.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/g_lock.c

index 9342302382207de8b18d3c23fb8e2e3422c7d50c..198fe563eb95938a779d6b7fec37d83dcc42d05d 100644 (file)
@@ -193,7 +193,7 @@ struct g_lock_ctx *g_lock_ctx_init(TALLOC_CTX *mem_ctx,
        backend = db_open(result, db_path, 0,
                          TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH,
                          O_RDWR|O_CREAT, 0600,
-                         DBWRAP_LOCK_ORDER_2,
+                         DBWRAP_LOCK_ORDER_3,
                          DBWRAP_FLAG_NONE);
        TALLOC_FREE(db_path);
        if (backend == NULL) {