summaryrefslogtreecommitdiff
path: root/source4/cluster
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-13 22:46:23 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:50:00 +0100
commit61873ce94c172c801a4831de5550a8e0fe54c5f5 (patch)
tree1adef0ad4078d98bd8529be8219af84938886f65 /source4/cluster
parenta2cea02584256e2cf59da5420e8e080e70c66939 (diff)
downloadsamba-61873ce94c172c801a4831de5550a8e0fe54c5f5.tar.gz
r26431: Require ndr_push creators to specify a iconv_convenience context.
(This used to be commit 7352206f4450fdf881b95bda064cedd9d2477e4c)
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 673ce2be4e1..6bac1dcbe50 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 c83cc2cfa33..7cd31282cc1 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 6307ba8ae65..1c895b8640d 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 6bac3508052..9a543ee3ee5 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 c994596930a..539e47d2713 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);