summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-02 22:32:11 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:15 +0100
commit6c999cd12344f2bb8b1d2941210b4c205b3e0aad (patch)
tree0911e4ca75694e080173c2863e2c41ff5881309c /source4/param
parent934e932387ea5668ec000bcefe4ec86935297339 (diff)
downloadsamba-6c999cd12344f2bb8b1d2941210b4c205b3e0aad.tar.gz
samba-6c999cd12344f2bb8b1d2941210b4c205b3e0aad.tar.bz2
samba-6c999cd12344f2bb8b1d2941210b4c205b3e0aad.zip
r26236: Remove more uses of global_loadparm or specify loadparm_context explicitly.
(This used to be commit 5b29ef7c03d9ae76b0ca909e9f03a58e1bad3521)
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/share.c4
-rw-r--r--source4/param/share.h2
-rw-r--r--source4/param/tests/share.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/source4/param/share.c b/source4/param/share.c
index 489049f39f..6c0269d5fc 100644
--- a/source4/param/share.c
+++ b/source4/param/share.c
@@ -149,10 +149,10 @@ NTSTATUS share_get_context(TALLOC_CTX *mem_ctx, struct share_context **ctx)
/*
initialise the SHARE subsystem
*/
-NTSTATUS share_init(void)
+NTSTATUS share_init(struct loadparm_context *lp_ctx)
{
init_module_fn static_init[] = STATIC_share_MODULES;
- init_module_fn *shared_init = load_samba_modules(NULL, global_loadparm, "share");
+ init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx, "share");
run_init_functions(static_init);
run_init_functions(shared_init);
diff --git a/source4/param/share.h b/source4/param/share.h
index c93d0d9857..fae1c31c13 100644
--- a/source4/param/share.h
+++ b/source4/param/share.h
@@ -61,6 +61,8 @@ struct share_ops {
NTSTATUS (*remove)(struct share_context *, const char *);
};
+struct loadparm_context;
+
#include "param/share_proto.h"
/* list of shares options */
diff --git a/source4/param/tests/share.c b/source4/param/tests/share.c
index de93e3c591..26af71d06f 100644
--- a/source4/param/tests/share.c
+++ b/source4/param/tests/share.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "param/share.h"
+#include "param/param.h"
#include "torture/torture.h"
static bool test_list_empty(struct torture_context *tctx,
@@ -196,7 +197,7 @@ struct torture_suite *torture_local_share(TALLOC_CTX *mem_ctx)
struct torture_suite *suite = torture_suite_create(mem_ctx, "SHARE");
struct torture_tcase *tcase;
- share_init();
+ share_init(global_loadparm);
tcase = torture_suite_add_tcase(suite, "ldb");
torture_tcase_set_fixture(tcase, setup_ldb, teardown);