From: Alan T. DeKok Date: Thu, 6 Mar 2025 14:38:06 +0000 (-0500) Subject: remove '&' from files module configuration X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a67ab0c790d552449879ddaacc747f004c09326c;p=thirdparty%2Ffreeradius-server.git remove '&' from files module configuration --- diff --git a/doc/antora/modules/reference/pages/raddb/mods-available/files.adoc b/doc/antora/modules/reference/pages/raddb/mods-available/files.adoc index 18eb0c7d73..88055dc264 100644 --- a/doc/antora/modules/reference/pages/raddb/mods-available/files.adoc +++ b/doc/antora/modules/reference/pages/raddb/mods-available/files.adoc @@ -50,7 +50,7 @@ When this flag is set, any enumeration names (e.g. Service-Type := Framed-User) do not need to have the v4 "::" prefix. This flag helps with migrating v3 configurations to v4. -Default value "false". Allowerd vlaues, "true' and "false". +Default value "false". Allowed vaues, `true` and `false`. @@ -62,13 +62,13 @@ Default value "false". Allowerd vlaues, "true' and "false". ``` files { moddir = ${modconfdir}/${.:instance} -# key = "%{&Stripped-User-Name || &User-Name}" +# key = "%{Stripped-User-Name || User-Name}" filename = ${moddir}/authorize -# match_attr = &control.User-Category +# match_attr = control.User-Category # v3_compat = false } files files_accounting { -# key = "%{&Stripped-User-Name || &User-Name}" +# key = "%{Stripped-User-Name || &User-Name}" filename = ${modconfdir}/files/accounting } ``` diff --git a/raddb/mods-available/files b/raddb/mods-available/files index d17fe40a10..f7f2b21852 100644 --- a/raddb/mods-available/files +++ b/raddb/mods-available/files @@ -33,7 +33,7 @@ files { # # doc/antora/modules/raddb/pages/mods-config/files/users.adoc # -# key = "%{&Stripped-User-Name || &User-Name}" +# key = "%{Stripped-User-Name || User-Name}" # # filename:: The old `users` style file is now located here. @@ -49,7 +49,7 @@ files { # value will be the subnet. In that case it is best to use `0.0.0.0/0` in place # of `DEFAULT` for any catch-all entries. # -# match_attr = &control.User-Category +# match_attr = control.User-Category # # v3_compat:: Version 3 compatibility flag. @@ -58,7 +58,7 @@ files { # do not need to have the v4 "::" prefix. This flag helps with migrating v3 # configurations to v4. # - # Default value "false". Allowerd vlaues, "true' and "false". + # Default value "false". Allowed vaues, `true` and `false`. # # v3_compat = false } @@ -67,6 +67,6 @@ files { # ## An instance of the `files` module for use in processing accounting packets # files files_accounting { -# key = "%{&Stripped-User-Name || &User-Name}" +# key = "%{Stripped-User-Name || &User-Name}" filename = ${modconfdir}/files/accounting } diff --git a/src/modules/rlm_files/rlm_files.c b/src/modules/rlm_files/rlm_files.c index 6e7db7083f..b13424ecec 100644 --- a/src/modules/rlm_files/rlm_files.c +++ b/src/modules/rlm_files/rlm_files.c @@ -690,7 +690,7 @@ static const call_env_method_t method_env = { FR_CALL_ENV_METHOD_OUT(rlm_files_env_t), .env = (call_env_parser_t[]){ { FR_CALL_ENV_PARSE_ONLY_OFFSET("key", FR_TYPE_VOID, CALL_ENV_FLAG_PARSE_ONLY, rlm_files_env_t, data), - .pair.dflt = "%{%{Stripped-User-Name} || %{User-Name}}", .pair.dflt_quote = T_DOUBLE_QUOTED_STRING, + .pair.dflt = "%{Stripped-User-Name || User-Name}", .pair.dflt_quote = T_DOUBLE_QUOTED_STRING, .pair.func = call_env_parse }, { FR_CALL_ENV_PARSE_ONLY_OFFSET("match_attr", FR_TYPE_VOID, CALL_ENV_FLAG_ATTRIBUTE, rlm_files_env_t, match_attr) }, CALL_ENV_TERMINATOR