summaryrefslogtreecommitdiff
path: root/source4/cluster
diff options
context:
space:
mode:
Diffstat (limited to 'source4/cluster')
-rw-r--r--source4/cluster/cluster.c4
-rw-r--r--source4/cluster/cluster.h2
-rw-r--r--source4/cluster/cluster_private.h4
-rw-r--r--source4/cluster/ctdb/ctdb_cluster.c1
-rw-r--r--source4/cluster/local.c3
5 files changed, 9 insertions, 5 deletions
diff --git a/source4/cluster/cluster.c b/source4/cluster/cluster.c
index 673ce2be4e..6bac1dcbe5 100644
--- a/source4/cluster/cluster.c
+++ b/source4/cluster/cluster.c
@@ -69,10 +69,10 @@ const char *cluster_id_string(TALLOC_CTX *mem_ctx, struct server_id id)
/*
open a temporary tdb in a cluster friendly manner
*/
-struct tdb_wrap *cluster_tdb_tmp_open(TALLOC_CTX *mem_ctx, const char *dbname, int flags)
+struct tdb_wrap *cluster_tdb_tmp_open(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, const char *dbname, int flags)
{
cluster_init();
- return ops->cluster_tdb_tmp_open(ops, mem_ctx, dbname, flags);
+ return ops->cluster_tdb_tmp_open(ops, mem_ctx, lp_ctx, dbname, flags);
}
diff --git a/source4/cluster/cluster.h b/source4/cluster/cluster.h
index c83cc2cfa3..7cd31282cc 100644
--- a/source4/cluster/cluster.h
+++ b/source4/cluster/cluster.h
@@ -38,7 +38,7 @@ typedef void (*cluster_message_fn_t)(struct messaging_context *, DATA_BLOB);
/* prototypes */
struct server_id cluster_id(uint32_t id);
const char *cluster_id_string(TALLOC_CTX *mem_ctx, struct server_id id);
-struct tdb_wrap *cluster_tdb_tmp_open(TALLOC_CTX *mem_ctx, const char *dbname, int flags);
+struct tdb_wrap *cluster_tdb_tmp_open(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, const char *dbname, int flags);
void *cluster_backend_handle(void);
NTSTATUS cluster_message_init(struct messaging_context *msg, struct server_id server,
diff --git a/source4/cluster/cluster_private.h b/source4/cluster/cluster_private.h
index 6307ba8ae6..1c895b8640 100644
--- a/source4/cluster/cluster_private.h
+++ b/source4/cluster/cluster_private.h
@@ -27,7 +27,9 @@ struct cluster_ops {
const char *(*cluster_id_string)(struct cluster_ops *ops,
TALLOC_CTX *, struct server_id );
struct tdb_wrap *(*cluster_tdb_tmp_open)(struct cluster_ops *,
- TALLOC_CTX *, const char *, int);
+ TALLOC_CTX *,
+ struct loadparm_context *,
+ const char *, int);
void *(*backend_handle)(struct cluster_ops *);
NTSTATUS (*message_init)(struct cluster_ops *ops,
struct messaging_context *msg, struct server_id server,
diff --git a/source4/cluster/ctdb/ctdb_cluster.c b/source4/cluster/ctdb/ctdb_cluster.c
index 6bac350805..9a543ee3ee 100644
--- a/source4/cluster/ctdb/ctdb_cluster.c
+++ b/source4/cluster/ctdb/ctdb_cluster.c
@@ -80,6 +80,7 @@ static const char *ctdb_id_string(struct cluster_ops *ops,
*/
static struct tdb_wrap *ctdb_tdb_tmp_open(struct cluster_ops *ops,
TALLOC_CTX *mem_ctx,
+ struct loadparm_context *lp_ctx,
const char *dbname, int flags)
{
const char *dir = lp_parm_string(global_loadparm, NULL, "ctdb", "shared data");
diff --git a/source4/cluster/local.c b/source4/cluster/local.c
index c994596930..539e47d271 100644
--- a/source4/cluster/local.c
+++ b/source4/cluster/local.c
@@ -56,9 +56,10 @@ static const char *local_id_string(struct cluster_ops *ops,
*/
static struct tdb_wrap *local_tdb_tmp_open(struct cluster_ops *ops,
TALLOC_CTX *mem_ctx,
+ struct loadparm_context *lp_ctx,
const char *dbname, int flags)
{
- char *path = smbd_tmp_path(mem_ctx, global_loadparm, dbname);
+ char *path = smbd_tmp_path(mem_ctx, lp_ctx, dbname);
struct tdb_wrap *w;
w = tdb_wrap_open(mem_ctx, path, 0, flags,
O_RDWR|O_CREAT, 0600);