Dictionary migration instructions can be found in `${raddbdir}/dictionary`.
-rewrite_update:: Rewrite old `update` sections to use the new
-"edit" code.
-
-When this flag is set to `true`, the server will read the
-`update` section, and swap the internal implementation to
-use the new code. The configuration file can still contain
-the `update` keyword.
-
-Not all `update` sections can be automatically converted.
-If the conversion process does not work, then the server
-will produce an error instead of doing the wrong thing.
-
-
-
-forbid_update:: Forbid the use of the `update` keyword.
-
-This flag allows us to remove the last bits of the v2
-configuration from the server.
-
-
-
.Module Configuration
The names and configuration of each module is located in this section.
$INCLUDE global.d/
}
migrate {
- rewrite_update = false
- forbid_update = false
}
modules {
# $INCLUDE mods-enabled/sql
# Dictionary migration instructions can be found in `${raddbdir}/dictionary`.
#
migrate {
- #
- # rewrite_update:: Rewrite old `update` sections to use the new
- # "edit" code.
- #
- # When this flag is set to `true`, the server will read the
- # `update` section, and swap the internal implementation to
- # use the new code. The configuration file can still contain
- # the `update` keyword.
- #
- # Not all `update` sections can be automatically converted.
- # If the conversion process does not work, then the server
- # will produce an error instead of doing the wrong thing.
- #
- rewrite_update = false
-
- #
- # forbid_update:: Forbid the use of the `update` keyword.
- #
- # This flag allows us to remove the last bits of the v2
- # configuration from the server.
- #
- forbid_update = false
}
#
#endif
fprintf(output, " -P Always write out PID, even with -f.\n");
fprintf(output, " -s Do not spawn child processes to handle requests (same as -ft).\n");
- fprintf(output, " -S <flag> Set migration flags to assist with upgrades from version 3. Flags are:\n\n");
- fprintf(output, " rewrite_update=no Use the old v3 interpreter for 'update' sections.\n");
- fprintf(output, " forbid_update=yes Error if the old v3 'update' section is used.\n");
- fprintf(output, " v3_enum_names=yes Do not use '::' as the prefix for enumeration names,\n");
- fprintf(output, " AND require '&' for all attribute names.\n");
+ fprintf(output, " -S <flag> Set migration flags to assist with upgrades from version 3.\n");
fprintf(output, " -t Disable threads.\n");
fprintf(output, " -T Prepend timestamps to log messages.\n");
fprintf(output, " -v Print server version information.\n");
return cs->name2_quote;
}
-/** Set the quoting of the name2 identifier
- *
- * @param[in] cs containing name2.
- * @param[in] token the quote token
- */
-void cf_section_add_name2_quote(CONF_SECTION *cs, fr_token_t token)
-{
- if (!cs) return;
-
- cs->name2_quote = token;
-}
-
/** Return the quoting for one of the variadic arguments
*
* @param[in] cs containing the arguments.
fr_token_t cf_section_name2_quote(CONF_SECTION const *cs);
fr_token_t cf_section_argv_quote(CONF_SECTION const *cs, int argc);
-// only for rewrite_update
-void cf_section_add_name2_quote(CONF_SECTION *cs, fr_token_t token);
-
#define cf_section_free_children(_x) cf_item_free_children(cf_section_to_item(_x))
* Migration configuration.
*/
static const conf_parser_t migrate_config[] = {
- { FR_CONF_OFFSET_FLAGS("rewrite_update", CONF_FLAG_HIDDEN, main_config_t, rewrite_update) },
- { FR_CONF_OFFSET_FLAGS("forbid_update", CONF_FLAG_HIDDEN, main_config_t, forbid_update) },
-
CONF_PARSER_TERMINATOR
};
}
static fr_table_num_ordered_t config_arg_table[] = {
- { 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);
/*
* Migration tools
*/
- 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);
#
PROCESS_ARGS := -p test
PROCESS_ARGS += -D $(DIR)/share -d $(DIR)/
-PROCESS_ARGS += -S forbid_update=yes
PROCESS_ARGS += -i $(DIR)/test.attrs -f $(DIR)/test.attrs
$(OUTPUT)/%: $(DIR)/% $(PROCESS_DICT) $(TEST_BIN_DIR)/unit_test_module $(DIR)/unit_test_module.conf