1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

libcli: Call dbwrap_local_open with the correct hash size

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2018-04-17 16:38:27 +02:00 committed by Jeremy Allison
parent 91bb8b8ec6
commit 807cb593ec

View File

@ -215,6 +215,7 @@ NTSTATUS netlogon_creds_cli_open_global_db(struct loadparm_context *lp_ctx)
{
char *fname;
struct db_context *global_db;
int hash_size;
if (netlogon_creds_cli_global_db != NULL) {
return NT_STATUS_OK;
@ -225,12 +226,18 @@ NTSTATUS netlogon_creds_cli_open_global_db(struct loadparm_context *lp_ctx)
return NT_STATUS_NO_MEMORY;
}
global_db = dbwrap_local_open(NULL, lp_ctx,
fname, 0,
TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH,
O_RDWR|O_CREAT,
0600, DBWRAP_LOCK_ORDER_2,
DBWRAP_FLAG_NONE);
hash_size = lpcfg_tdb_hash_size(lp_ctx, fname);
global_db = dbwrap_local_open(
NULL,
lp_ctx,
fname,
hash_size,
TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH,
O_RDWR|O_CREAT,
0600,
DBWRAP_LOCK_ORDER_2,
DBWRAP_FLAG_NONE);
if (global_db == NULL) {
DEBUG(0,("netlogon_creds_cli_open_global_db: Failed to open %s - %s\n",
fname, strerror(errno)));