commit a18891f0874bed3f85d0a97591d272ee7e03a3fb Author: qgibeaux Date: Thu Jul 17 09:55:40 2014 +0200 handle (ignore) substitution variable in smb.conf diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 455c5e6..f8e2234 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -1133,8 +1133,20 @@ static bool handle_include(struct loadparm_context *lp_ctx, int unused, lpcfg_string_set(lp_ctx, ptr, fname); - if (file_exist(fname)) + if (file_exist(fname)) { return pm_process(fname, do_section, do_parameter, lp_ctx); + } else { + char *varSubStr; + varSubStr = strstr(fname, "%"); + if(varSubStr) { + char nextChar = varSubStr[1]; + if(nextChar && (nextChar>='a'&& nextChar<='z') || (nextChar>='A' && nextChar<='Z')) + { + DEBUG (3, ("Tried to load %s but variable in filename, ignoring file...\n", fname) ); + return( true ); + } + } + } DEBUG(2, ("Can't find include file %s\n", fname));