libcli: Call dbwrap_local_open with the correct tdb_flags
authorVolker Lendecke <vl@samba.org>
Tue, 17 Apr 2018 14:20:02 +0000 (16:20 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 23 Apr 2018 23:53:18 +0000 (01:53 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/auth/schannel_state_tdb.c

index 4b02261663a52c36f149af25843796dd81402abe..15554b2ed488f154f408b59e04c2f4963940caee 100644 (file)
@@ -42,20 +42,21 @@ struct db_context *open_schannel_session_store(TALLOC_CTX *mem_ctx,
 {
        struct db_context *db_sc = NULL;
        char *fname = lpcfg_private_db_path(mem_ctx, lp_ctx, "schannel_store");
-       int hash_size;
+       int hash_size, tdb_flags;
 
        if (!fname) {
                return NULL;
        }
 
        hash_size = lpcfg_tdb_hash_size(lp_ctx, fname);
+       tdb_flags = lpcfg_tdb_flags(lp_ctx, TDB_CLEAR_IF_FIRST|TDB_NOSYNC);
 
        db_sc = dbwrap_local_open(
                mem_ctx,
                lp_ctx,
                fname,
                hash_size,
-               TDB_CLEAR_IF_FIRST|TDB_NOSYNC,
+               tdb_flags,
                O_RDWR|O_CREAT,
                0600,
                DBWRAP_LOCK_ORDER_NONE,