unsigned int flags[NUMPARAMETERS];
bool loaded;
bool refuse_free;
+ bool global; /* Is this the global context, which may set
+ * global variables such as debug level etc? */
};
{
string_set(lp_ctx, ptr, pszParmValue);
- return debug_parse_levels(pszParmValue);
+ if (lp_ctx->global) {
+ return debug_parse_levels(pszParmValue);
+ }
+ return true;
}
static bool handle_logfile(struct loadparm_context *lp_ctx,
const char *pszParmValue, char **ptr)
{
debug_set_logfile(pszParmValue);
- string_set(lp_ctx, ptr, pszParmValue);
+ if (lp_ctx->global) {
+ string_set(lp_ctx, ptr, pszParmValue);
+ }
return true;
}
if (global_loadparm_context == NULL) {
return NULL;
}
+ global_loadparm_context->global = true;
if (load_default && !global_loadparm_context->loaded) {
lpcfg_load_default(global_loadparm_context);
}
lpcfg_do_global_parameter(lp_ctx, "wins server", "127.0.0.1");
}
+ if (!lp_ctx->global) {
+ return true;
+ }
+
panic_action = lp_ctx->globals->panic_action;
reload_charcnv(lp_ctx);
_PUBLIC_ void reload_charcnv(struct loadparm_context *lp_ctx)
{
struct smb_iconv_handle *old_ic = lp_ctx->iconv_handle;
+ if (!lp_ctx->global) {
+ return;
+ }
+
if (old_ic == NULL) {
old_ic = global_iconv_handle;
}