summaryrefslogtreecommitdiff
path: root/source4/ntvfs/common
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/common')
-rw-r--r--source4/ntvfs/common/brlock.c3
-rw-r--r--source4/ntvfs/common/brlock.h1
-rw-r--r--source4/ntvfs/common/brlock_tdb.c3
-rw-r--r--source4/ntvfs/common/opendb.c2
4 files changed, 6 insertions, 3 deletions
diff --git a/source4/ntvfs/common/brlock.c b/source4/ntvfs/common/brlock.c
index ddf3219a9a..c87eca8aff 100644
--- a/source4/ntvfs/common/brlock.c
+++ b/source4/ntvfs/common/brlock.c
@@ -48,12 +48,13 @@ void brl_set_ops(const struct brlock_ops *new_ops)
need the messaging_ctx to allow for pending lock notifications.
*/
struct brl_context *brl_init(TALLOC_CTX *mem_ctx, struct server_id server,
+ struct loadparm_context *lp_ctx,
struct messaging_context *messaging_ctx)
{
if (ops == NULL) {
brl_tdb_init_ops();
}
- return ops->brl_init(mem_ctx, server, messaging_ctx);
+ return ops->brl_init(mem_ctx, server, lp_ctx, messaging_ctx);
}
struct brl_handle *brl_create_handle(TALLOC_CTX *mem_ctx, struct ntvfs_handle *ntvfs, DATA_BLOB *file_key)
diff --git a/source4/ntvfs/common/brlock.h b/source4/ntvfs/common/brlock.h
index 50f30ec276..aff30d138e 100644
--- a/source4/ntvfs/common/brlock.h
+++ b/source4/ntvfs/common/brlock.h
@@ -23,6 +23,7 @@
struct brlock_ops {
struct brl_context *(*brl_init)(TALLOC_CTX *, struct server_id ,
+ struct loadparm_context *lp_ctx,
struct messaging_context *);
struct brl_handle *(*brl_create_handle)(TALLOC_CTX *, struct ntvfs_handle *, DATA_BLOB *);
NTSTATUS (*brl_lock)(struct brl_context *,
diff --git a/source4/ntvfs/common/brlock_tdb.c b/source4/ntvfs/common/brlock_tdb.c
index 25642d5f5c..362a6d01e2 100644
--- a/source4/ntvfs/common/brlock_tdb.c
+++ b/source4/ntvfs/common/brlock_tdb.c
@@ -86,6 +86,7 @@ struct brl_handle {
pending lock notifications.
*/
static struct brl_context *brl_tdb_init(TALLOC_CTX *mem_ctx, struct server_id server,
+ struct loadparm_context *lp_ctx,
struct messaging_context *messaging_ctx)
{
struct brl_context *brl;
@@ -95,7 +96,7 @@ static struct brl_context *brl_tdb_init(TALLOC_CTX *mem_ctx, struct server_id se
return NULL;
}
- brl->db = db_tmp_open(brl, global_loadparm, "brlock.tdb", TDB_DEFAULT);
+ brl->db = db_tmp_open(brl, lp_ctx, "brlock.tdb", TDB_DEFAULT);
if (brl->db == NULL) {
talloc_free(brl);
return NULL;
diff --git a/source4/ntvfs/common/opendb.c b/source4/ntvfs/common/opendb.c
index 59990d2fc1..4826ca5c26 100644
--- a/source4/ntvfs/common/opendb.c
+++ b/source4/ntvfs/common/opendb.c
@@ -62,7 +62,7 @@ _PUBLIC_ struct odb_context *odb_init(TALLOC_CTX *mem_ctx,
struct ntvfs_context *ntvfs_ctx)
{
if (ops == NULL) {
- if (lp_parm_bool(global_loadparm, NULL, "ctdb", "opendb", false)) {
+ if (lp_parm_bool(ntvfs_ctx->lp_ctx, NULL, "ctdb", "opendb", false)) {
odb_ctdb_init_ops();
} else {
odb_tdb_init_ops();