summaryrefslogtreecommitdiff
path: root/auth/credentials
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2018-04-17 16:23:03 +0200
committerJeremy Allison <jra@samba.org>2018-04-24 01:53:18 +0200
commit7f09fd2b4c07fcf0e0d132d1fb487f1c1e040ad4 (patch)
treed803ab8101c7e9a1c3af901035ec8f3c73726b61 /auth/credentials
parent7e183a22a7995db09c9bed561ab0de71dbdfdbcb (diff)
downloadsamba-7f09fd2b4c07fcf0e0d132d1fb487f1c1e040ad4.tar.gz
credentials: Call dbwrap_local_open with the correct tdb_flags
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'auth/credentials')
-rw-r--r--auth/credentials/credentials_secrets.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/auth/credentials/credentials_secrets.c b/auth/credentials/credentials_secrets.c
index b22654e370e..23d28f1917d 100644
--- a/auth/credentials/credentials_secrets.c
+++ b/auth/credentials/credentials_secrets.c
@@ -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,