]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove forbid_update and rewrite_update migration flags
authorAlan T. DeKok <aland@freeradius.org>
Tue, 19 Aug 2025 13:57:44 +0000 (09:57 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 19 Aug 2025 13:58:44 +0000 (09:58 -0400)
the framework is temporarily left in place, so that it can be used
if we need to add more flags.  But that should be removed before
a v4 release

doc/antora/modules/reference/pages/raddb/radiusd.conf.adoc
raddb/radiusd.conf.in
src/bin/radiusd.c
src/lib/server/cf_util.c
src/lib/server/cf_util.h
src/lib/server/main_config.c
src/lib/server/main_config.h
src/tests/process/all.mk

index 11bf71c5a9905e6cc37c6d7e8065f4feeb95702b..7208df674931f919b59d25d6536cce2b117c02d7 100644 (file)
@@ -592,27 +592,6 @@ Some of these flags can also be passed on the command line as
 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.
@@ -794,8 +773,6 @@ global {
        $INCLUDE global.d/
 }
 migrate {
-       rewrite_update = false
-       forbid_update = false
 }
 modules {
 #      $INCLUDE mods-enabled/sql
index 7e43c739c91f1d04c592de70d5e2140c8b80e234..380ea39052e2559231a5679ae4dda6a8da70c8cc 100644 (file)
@@ -665,28 +665,6 @@ global {
 #  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
 }
 
 #
index bfa5144f407fa0f560d2dc7340a670d7530fe9d6..c1405fced33a6c53cae71022348d8660a9fed235 100644 (file)
@@ -1201,11 +1201,7 @@ static NEVER_RETURNS void usage(int status)
 #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");
index ea78f5049b2c75bbbc4609ea90cc737627a56d3e..15c8b29095d264e55518ae7a19667e1d4de91923 100644 (file)
@@ -1233,18 +1233,6 @@ fr_token_t cf_section_name2_quote(CONF_SECTION const *cs)
        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.
index 4bd4fd30eec2c069580c56f98a7e680d4007ec77..938cd28518effa4a7d14e288e2bb60e46b06dde7 100644 (file)
@@ -190,9 +190,6 @@ char const  *cf_section_argv(CONF_SECTION const *cs, int argc);
 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))
 
 
index 81aa1308ab5746c03904a737c61c2b3a3d69f16e..df29ef603a4afdce6287a38fce8a14cad0b6f2de 100644 (file)
@@ -176,9 +176,6 @@ static const conf_parser_t thread_config[] = {
  *     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
 };
 
@@ -1444,8 +1441,6 @@ void main_config_hup(main_config_t *config)
 }
 
 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);
 
index fe8901b3ee62daa9231a44907e0715f62a47499f..e42850eadd441a5e911b84d748e87f464a1ebb6e 100644 (file)
@@ -153,8 +153,6 @@ struct main_config_s {
        /*
         *      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);
index 47505c10cf975310034059f45bb606bbfe8fc1af..b66064d9b8c3b18fd88a6356c149c816394adc83 100644 (file)
@@ -89,7 +89,6 @@ $(foreach x,$(FILES),$(eval $(call PROCESS_TEST,$x)))
 #
 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