From: Volker Lendecke Date: Tue, 17 Apr 2018 14:22:08 +0000 (+0200) Subject: credentials: Call dbwrap_local_open with the correct hash size X-Git-Tag: ldb-1.4.0~556 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e183a22a7995db09c9bed561ab0de71dbdfdbcb;p=thirdparty%2Fsamba.git credentials: Call dbwrap_local_open with the correct hash size Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/auth/credentials/credentials_secrets.c b/auth/credentials/credentials_secrets.c index 8d2a3b7a46e..b22654e370e 100644 --- a/auth/credentials/credentials_secrets.c +++ b/auth/credentials/credentials_secrets.c @@ -238,16 +238,25 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cr { struct db_context *db_ctx; char *secrets_tdb_path; + int hash_size; secrets_tdb_path = lpcfg_private_db_path(cred, lp_ctx, "secrets"); if (secrets_tdb_path == NULL) { return NT_STATUS_NO_MEMORY; } - db_ctx = dbwrap_local_open(cred, lp_ctx, secrets_tdb_path, 0, - TDB_DEFAULT, O_RDWR, 0600, - DBWRAP_LOCK_ORDER_1, - DBWRAP_FLAG_NONE); + hash_size = lpcfg_tdb_hash_size(lp_ctx, secrets_tdb_path); + + db_ctx = dbwrap_local_open( + cred, + lp_ctx, + secrets_tdb_path, + hash_size, + TDB_DEFAULT, + O_RDWR, + 0600, + DBWRAP_LOCK_ORDER_1, + DBWRAP_FLAG_NONE); TALLOC_FREE(secrets_tdb_path); /*