/* The following definitions come from param/loadparm.c */
+const struct loadparm_substitution *loadparm_s3_global_substitution(void);
+
#include "source3/param/param_proto.h"
char *lp_servicename(TALLOC_CTX *ctx, int);
*
*/
+#define LOADPARM_SUBSTITUTION_INTERNALS 1
#include "includes.h"
#include "system/filesys.h"
#include "util_tdb.h"
callers without affecting the source string.
********************************************************************/
-char *lp_string(TALLOC_CTX *mem_ctx, const char *s)
+static char *loadparm_s3_global_substitution_fn(
+ TALLOC_CTX *mem_ctx,
+ const struct loadparm_substitution *lp_sub,
+ const char *s,
+ void *private_data)
{
char *ret;
return ret;
}
+static const struct loadparm_substitution s3_global_substitution = {
+ .substituted_string_fn = loadparm_s3_global_substitution_fn,
+};
+
+const struct loadparm_substitution *loadparm_s3_global_substitution(void)
+{
+ return &s3_global_substitution;
+}
+
+char *lp_string(TALLOC_CTX *ctx, const char *s)
+{
+ return lpcfg_substituted_string(ctx, &s3_global_substitution, s);
+}
+
/*
In this section all the functions that are used to access the
parameters from the rest of the program are defined