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

libcli: Call dbwrap_local_open with the correct tdb flags

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:39:46 +02:00 committed by Jeremy Allison
parent 807cb593ec
commit 812312ca17

View File

@ -215,7 +215,7 @@ NTSTATUS netlogon_creds_cli_open_global_db(struct loadparm_context *lp_ctx)
{ {
char *fname; char *fname;
struct db_context *global_db; struct db_context *global_db;
int hash_size; int hash_size, tdb_flags;
if (netlogon_creds_cli_global_db != NULL) { if (netlogon_creds_cli_global_db != NULL) {
return NT_STATUS_OK; return NT_STATUS_OK;
@ -227,13 +227,16 @@ NTSTATUS netlogon_creds_cli_open_global_db(struct loadparm_context *lp_ctx)
} }
hash_size = lpcfg_tdb_hash_size(lp_ctx, fname); hash_size = lpcfg_tdb_hash_size(lp_ctx, fname);
tdb_flags = lpcfg_tdb_flags(
lp_ctx,
TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH);
global_db = dbwrap_local_open( global_db = dbwrap_local_open(
NULL, NULL,
lp_ctx, lp_ctx,
fname, fname,
hash_size, hash_size,
TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH, tdb_flags,
O_RDWR|O_CREAT, O_RDWR|O_CREAT,
0600, 0600,
DBWRAP_LOCK_ORDER_2, DBWRAP_LOCK_ORDER_2,