diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-10 04:33:16 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:49:01 +0100 |
commit | b65dba2245bf382c47d65c95ac9b1efa43918fc0 (patch) | |
tree | e2a474ba5bd99368423ad11d3632c55a51ed865c /source4/ntvfs | |
parent | 4a36b71675a5ea2a22d7cf2a79d61a3cd511e99f (diff) | |
download | samba-b65dba2245bf382c47d65c95ac9b1efa43918fc0.tar.gz samba-b65dba2245bf382c47d65c95ac9b1efa43918fc0.tar.bz2 samba-b65dba2245bf382c47d65c95ac9b1efa43918fc0.zip |
r26355: Eliminate global_loadparm in more places.
(This used to be commit 5d589a0d94bd76a9b4c9fc748854e8098ea43c4d)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/common/brlock.c | 3 | ||||
-rw-r--r-- | source4/ntvfs/common/brlock.h | 1 | ||||
-rw-r--r-- | source4/ntvfs/common/brlock_tdb.c | 3 | ||||
-rw-r--r-- | source4/ntvfs/common/opendb.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/ntvfs_base.c | 4 | ||||
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.c | 1 |
6 files changed, 9 insertions, 5 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(); diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c index 9172fe1580..3873afbdfa 100644 --- a/source4/ntvfs/ntvfs_base.c +++ b/source4/ntvfs/ntvfs_base.c @@ -199,10 +199,10 @@ NTSTATUS ntvfs_init_connection(TALLOC_CTX *mem_ctx, struct share_config *scfg, e return NT_STATUS_OK; } -NTSTATUS ntvfs_init(void) +NTSTATUS ntvfs_init(struct loadparm_context *lp_ctx) { init_module_fn static_init[] = STATIC_ntvfs_MODULES; - init_module_fn *shared_init = load_samba_modules(NULL, global_loadparm, "ntvfs"); + init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx, "ntvfs"); run_init_functions(static_init); run_init_functions(shared_init); diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c index c1e15976d2..8e5e5a6942 100644 --- a/source4/ntvfs/posix/vfs_posix.c +++ b/source4/ntvfs/posix/vfs_posix.c @@ -199,6 +199,7 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs, pvfs->brl_context = brl_init(pvfs, pvfs->ntvfs->ctx->server_id, + pvfs->ntvfs->ctx->lp_ctx, pvfs->ntvfs->ctx->msg_ctx); if (pvfs->brl_context == NULL) { return NT_STATUS_INTERNAL_DB_CORRUPTION; |