summaryrefslogtreecommitdiff
path: root/source4/param/share_classic.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-10 04:33:16 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:01 +0100
commitb65dba2245bf382c47d65c95ac9b1efa43918fc0 (patch)
treee2a474ba5bd99368423ad11d3632c55a51ed865c /source4/param/share_classic.c
parent4a36b71675a5ea2a22d7cf2a79d61a3cd511e99f (diff)
downloadsamba-b65dba2245bf382c47d65c95ac9b1efa43918fc0.tar.gz
r26355: Eliminate global_loadparm in more places.
(This used to be commit 5d589a0d94bd76a9b4c9fc748854e8098ea43c4d)
Diffstat (limited to 'source4/param/share_classic.c')
-rw-r--r--source4/param/share_classic.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source4/param/share_classic.c b/source4/param/share_classic.c
index ab1b4bf904a..4a7fbcb263a 100644
--- a/source4/param/share_classic.c
+++ b/source4/param/share_classic.c
@@ -45,6 +45,8 @@ static const char *sclassic_string_option(struct share_config *scfg,
{
struct loadparm_service *s = talloc_get_type(scfg->opaque,
struct loadparm_service);
+ struct loadparm_context *lp_ctx = talloc_get_type(scfg->ctx->priv_data,
+ struct loadparm_context);
char *parm, *val;
const char *ret;
@@ -57,7 +59,7 @@ static const char *sclassic_string_option(struct share_config *scfg,
*val = '\0';
val++;
- ret = lp_parm_string(global_loadparm, s, parm, val);
+ ret = lp_parm_string(lp_ctx, s, parm, val);
if (!ret) {
ret = defval;
}
@@ -105,6 +107,8 @@ static int sclassic_int_option(struct share_config *scfg, const char *opt_name,
{
struct loadparm_service *s = talloc_get_type(scfg->opaque,
struct loadparm_service);
+ struct loadparm_context *lp_ctx = talloc_get_type(scfg->ctx->priv_data,
+ struct loadparm_context);
char *parm, *val;
int ret;
@@ -117,7 +121,7 @@ static int sclassic_int_option(struct share_config *scfg, const char *opt_name,
*val = '\0';
val++;
- ret = lp_parm_int(global_loadparm, s, parm, val, defval);
+ ret = lp_parm_int(lp_ctx, s, parm, val, defval);
if (!ret) {
ret = defval;
}
@@ -161,6 +165,8 @@ static bool sclassic_bool_option(struct share_config *scfg, const char *opt_name
{
struct loadparm_service *s = talloc_get_type(scfg->opaque,
struct loadparm_service);
+ struct loadparm_context *lp_ctx = talloc_get_type(scfg->ctx->priv_data,
+ struct loadparm_context);
char *parm, *val;
bool ret;
@@ -173,7 +179,7 @@ static bool sclassic_bool_option(struct share_config *scfg, const char *opt_name
*val = '\0';
val++;
- ret = lp_parm_bool(global_loadparm, s, parm, val, defval);
+ ret = lp_parm_bool(lp_ctx, s, parm, val, defval);
talloc_free(parm);
return ret;
}
@@ -228,6 +234,8 @@ static const char **sclassic_string_list_option(TALLOC_CTX *mem_ctx, struct shar
{
struct loadparm_service *s = talloc_get_type(scfg->opaque,
struct loadparm_service);
+ struct loadparm_context *lp_ctx = talloc_get_type(scfg->ctx->priv_data,
+ struct loadparm_context);
char *parm, *val;
const char **ret;
@@ -240,7 +248,7 @@ static const char **sclassic_string_list_option(TALLOC_CTX *mem_ctx, struct shar
*val = '\0';
val++;
- ret = lp_parm_string_list(mem_ctx, global_loadparm, s, parm, val, ",;");
+ ret = lp_parm_string_list(mem_ctx, lp_ctx, s, parm, val, ",;");
talloc_free(parm);
return ret;
}