From 7c9ecf35fa92395ce46d1410ae0b343f6dc24774 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 12 Aug 2011 11:26:42 +1000 Subject: param: Add smb.conf loading support to s3/s4 loadparm bridge --- source4/param/loadparm.c | 4 ++++ source4/script/mks3param.pl | 1 + 2 files changed, 5 insertions(+) (limited to 'source4') diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 3b0eefe603..c1fd5f22a2 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -3514,6 +3514,10 @@ bool lpcfg_load(struct loadparm_context *lp_ctx, const char *filename) char *n2; bool bRetval; + if (lp_ctx->s3_fns) { + return lp_ctx->s3_fns->load(filename); + } + filename = talloc_strdup(lp_ctx, filename); lp_ctx->szConfigFile = filename; diff --git a/source4/script/mks3param.pl b/source4/script/mks3param.pl index 761cd6980f..37277c20b1 100644 --- a/source4/script/mks3param.pl +++ b/source4/script/mks3param.pl @@ -92,6 +92,7 @@ sub print_header($$) $file->("\tstruct loadparm_service * (*get_default_loadparm_service)(void);\n"); $file->("\tstruct loadparm_service * (*get_servicebynum)(int snum);\n"); $file->("\tint (*get_numservices)(void);\n"); + $file->("\tbool (*load)(const char *filename);\n"); $file->("\tbool (*set_cmdline)(const char *pszParmName, const char *pszParmValue);\n"); } -- cgit