summaryrefslogtreecommitdiff
path: root/source4/cluster
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2018-04-17 16:25:19 +0200
committerJeremy Allison <jra@samba.org>2018-04-24 01:53:18 +0200
commit281822ac8e5ea3a23257d60f5bd9611e63faff0e (patch)
tree16cbf0a060f2ffa0375d286a5196ba0d8f6e3b57 /source4/cluster
parent7f09fd2b4c07fcf0e0d132d1fb487f1c1e040ad4 (diff)
downloadsamba-281822ac8e5ea3a23257d60f5bd9611e63faff0e.tar.gz
cluster4: Call dbwrap_local_open with the correct hash size
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/cluster')
-rw-r--r--source4/cluster/local.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/source4/cluster/local.c b/source4/cluster/local.c
index 5ef58c91bf6..d4c16b00cce 100644
--- a/source4/cluster/local.c
+++ b/source4/cluster/local.c
@@ -55,12 +55,24 @@ static struct db_context *local_db_tmp_open(struct cluster_ops *ops,
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
char *path, *dbname;
struct db_context *db;
+ int hash_size;
dbname = talloc_asprintf(mem_ctx, "%s.tdb", dbbase);
path = smbd_tmp_path(tmp_ctx, lp_ctx, dbname);
- db = dbwrap_local_open(mem_ctx, lp_ctx, path, 0, flags, O_RDWR|O_CREAT,
- 0600, DBWRAP_LOCK_ORDER_NONE, DBWRAP_FLAG_NONE);
+
+ hash_size = lpcfg_tdb_hash_size(lp_ctx, path);
+
+ db = dbwrap_local_open(
+ mem_ctx,
+ lp_ctx,
+ path,
+ hash_size,
+ flags,
+ O_RDWR|O_CREAT,
+ 0600,
+ DBWRAP_LOCK_ORDER_NONE,
+ DBWRAP_FLAG_NONE);
talloc_free(tmp_ctx);
return db;
}