{ FR_CONF_OFFSET("parse_new_conditions", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, parse_new_conditions) },
{ FR_CONF_OFFSET("use_new_conditions", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, use_new_conditions) },
{ FR_CONF_OFFSET("rewrite_update", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, rewrite_update) },
+ { FR_CONF_OFFSET("forbid_update", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, forbid_update) },
CONF_PARSER_TERMINATOR
};
{ L("use_new_conditions"), offsetof(main_config_t, use_new_conditions) },
{ L("tmpl_tokenize_all_nested"), offsetof(main_config_t, tmpl_tokenize_all_nested) },
{ L("rewrite_update"), offsetof(main_config_t, rewrite_update) },
+ { L("forbid_update"), offsetof(main_config_t, forbid_update) },
};
static size_t config_arg_table_len = NUM_ELEMENTS(config_arg_table);
bool parse_new_conditions; //!< the new xlat expressions will be parsed, but not used.
bool use_new_conditions; //!< the new xlat expressions will be used for conditions, instead of the old code
bool rewrite_update; //!< rewrite "update" to be new edit sections
+ bool forbid_update; //!< forbid "update" sections
};
void main_config_name_set_default(main_config_t *config, char const *name, bool overwrite_config);
.type_name = "unlang_map_t"
};
+ if (main_config_migrate_option_get("forbid_update")) {
+ cf_log_err(cs, "The use of 'update' sections is forbidden by the server configuration");
+ return NULL;
+ }
+
/*
* If we're migrating "update" sections to edit, then go
* do that now.