summaryrefslogtreecommitdiffstats
path: root/source3/param
diff options
context:
space:
mode:
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c7
-rw-r--r--source3/param/loadparm_ctx.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index f2d1e6b792..2f58a9c99e 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -1072,7 +1072,7 @@ static void init_globals(bool reinit_globals)
callers without affecting the source string.
********************************************************************/
-static char *lp_string(TALLOC_CTX *ctx, const char *s)
+char *lp_string(TALLOC_CTX *ctx, const char *s)
{
char *ret;
@@ -5263,3 +5263,8 @@ int lp_security(void)
return lp_find_security(lp__server_role(),
lp__security());
}
+
+struct loadparm_global * get_globals(void)
+{
+ return &Globals;
+}
diff --git a/source3/param/loadparm_ctx.c b/source3/param/loadparm_ctx.c
index 5cbc920529..c85d0772bd 100644
--- a/source3/param/loadparm_ctx.c
+++ b/source3/param/loadparm_ctx.c
@@ -60,5 +60,9 @@ static bool lp_load_for_s4_ctx(const char *filename)
const struct loadparm_s3_helpers *loadparm_s3_helpers(void)
{
- return &s3_fns;
+ struct loadparm_s3_helpers *helpers;
+ helpers = &s3_fns;
+ helpers->globals = get_globals();
+ helpers->lp_string = lp_string;
+ return helpers;
}