credentials: Call dbwrap_local_open with the correct tdb_flags
authorVolker Lendecke <vl@samba.org>
Tue, 17 Apr 2018 14:23:03 +0000 (16:23 +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>
auth/credentials/credentials_secrets.c

index b22654e370e171562742678250e9ab3fd9bc391f..23d28f1917d07966439af7e252429b63b535f7cc 100644 (file)
@@ -238,7 +238,7 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cr
 {
        struct db_context *db_ctx;
        char *secrets_tdb_path;
-       int hash_size;
+       int hash_size, tdb_flags;
 
        secrets_tdb_path = lpcfg_private_db_path(cred, lp_ctx, "secrets");
        if (secrets_tdb_path == NULL) {
@@ -246,13 +246,14 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cr
        }
 
        hash_size = lpcfg_tdb_hash_size(lp_ctx, secrets_tdb_path);
+       tdb_flags = lpcfg_tdb_flags(lp_ctx, TDB_DEFAULT);
 
        db_ctx = dbwrap_local_open(
                cred,
                lp_ctx,
                secrets_tdb_path,
                hash_size,
-               TDB_DEFAULT,
+               tdb_flags,
                O_RDWR,
                0600,
                DBWRAP_LOCK_ORDER_1,