summaryrefslogtreecommitdiff
path: root/source4/param/share_classic.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-03 15:53:17 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:28 +0100
commitab69eb8d8901d23794c6a298718e67656ef4820e (patch)
treecd415ecd2aee4caa9e47f6c442d0d23b2f443b9c /source4/param/share_classic.c
parent0a2f1a46a02d2c9497d05d7e534829dc6e9430dc (diff)
downloadsamba-ab69eb8d8901d23794c6a298718e67656ef4820e.tar.gz
r26250: Avoid global_loadparm in a couple more places.
(This used to be commit 2c6b755309fdf685cd0b0564272bf83038574a43)
Diffstat (limited to 'source4/param/share_classic.c')
-rw-r--r--source4/param/share_classic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/param/share_classic.c b/source4/param/share_classic.c
index cf140f0d32b..2dc40e3e251 100644
--- a/source4/param/share_classic.c
+++ b/source4/param/share_classic.c
@@ -32,7 +32,7 @@ static NTSTATUS sclassic_init(TALLOC_CTX *mem_ctx, const struct share_ops *ops,
}
(*ctx)->ops = ops;
- (*ctx)->priv_data = NULL;
+ (*ctx)->priv_data = global_loadparm;
return NT_STATUS_OK;
}
@@ -268,7 +268,7 @@ static NTSTATUS sclassic_list_all(TALLOC_CTX *mem_ctx,
int num_services;
const char **n;
- num_services = lp_numservices(global_loadparm);
+ num_services = lp_numservices((struct loadparm_context *)ctx->priv_data);
n = talloc_array(mem_ctx, const char *, num_services);
if (!n) {
@@ -277,7 +277,7 @@ static NTSTATUS sclassic_list_all(TALLOC_CTX *mem_ctx,
}
for (i = 0; i < num_services; i++) {
- n[i] = talloc_strdup(n, lp_servicename(lp_servicebynum(global_loadparm, i)));
+ n[i] = talloc_strdup(n, lp_servicename(lp_servicebynum((struct loadparm_context *)ctx->priv_data, i)));
if (!n[i]) {
DEBUG(0,("ERROR: Out of memory!\n"));
talloc_free(n);
@@ -299,7 +299,7 @@ static NTSTATUS sclassic_get_config(TALLOC_CTX *mem_ctx,
struct share_config *s;
struct loadparm_service *service;
- service = lp_service(global_loadparm, name);
+ service = lp_service((struct loadparm_context *)ctx->priv_data, name);
if (service == NULL) {
return NT_STATUS_OBJECT_NAME_NOT_FOUND;