From: Alan T. DeKok Date: Wed, 25 Oct 2023 20:59:03 +0000 (-0400) Subject: get rid of Tmp-* in configuration and examples X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc5880eb423364b46dd7fd86d415b2bace36aa65;p=thirdparty%2Ffreeradius-server.git get rid of Tmp-* in configuration and examples --- diff --git a/doc/antora/modules/raddb/pages/mods-available/client.adoc b/doc/antora/modules/raddb/pages/mods-available/client.adoc index 9942fd1eb0a..3335590c3b0 100644 --- a/doc/antora/modules/raddb/pages/mods-available/client.adoc +++ b/doc/antora/modules/raddb/pages/mods-available/client.adoc @@ -51,20 +51,20 @@ Maps arbitrary fields from a client definition to attributes in the current requ [source,unlang] --- -map client [] { // <1> - &Tmp-String-0 = 'nas_type' // <2> - &Tmp-String-1 := 'shortname' // <3> - &Tmp-String-3 += 'groups' // <4> +map client [] { // <1> + &Foo = 'nas_type' // <2> + &Bar := 'shortname' // <3> + &Baz += 'groups' // <4> } --- <1> By default `map client { ... }` will operate on the current client, but alternative clients can by specified by ``. <2> Assigns the value of the `nas_type` field from the client definition to - `&Tmp-String-0` if `&Tmp-String-0` doesn't exist. + `&Foo` if the `&Foo` attribute does not exist. <3> Assigns the value of the `shortname` field from the client definition to - `&Tmp-String-1`. -<4> Creates multiple `&Tmp-String-3` attributes from a custom group field associated + `&Bar`. +<4> Creates multiple `&Baz` attributes from a custom group field associated with the client. diff --git a/doc/antora/modules/raddb/pages/mods-available/csv.adoc b/doc/antora/modules/raddb/pages/mods-available/csv.adoc index ccb9994c96d..b1a2800ff06 100644 --- a/doc/antora/modules/raddb/pages/mods-available/csv.adoc +++ b/doc/antora/modules/raddb/pages/mods-available/csv.adoc @@ -171,8 +171,8 @@ as given the the key` field above. For example, the map could look like this: map csv &User-Name { - &reply.Reply-Message := 'color' - &Tmp-Integer-0 := 'count' +&reply.Reply-Message := 'color' +&Tmp-Integer-0 := 'count' } This map does the same operations as the key / update @@ -200,7 +200,7 @@ csv { key = &User-Name update reply { &Reply-Message := 'color' - &Tmp-Integer-0 := 'count' + &Foo := 'count' } } ``` diff --git a/doc/antora/modules/raddb/pages/mods-available/echo.adoc b/doc/antora/modules/raddb/pages/mods-available/echo.adoc index 3789b8f214e..8e46a3ba2bc 100644 --- a/doc/antora/modules/raddb/pages/mods-available/echo.adoc +++ b/doc/antora/modules/raddb/pages/mods-available/echo.adoc @@ -71,10 +71,10 @@ Allowed values are: [options="header,autowidth"] |=== | Pairs | Description -| request | attributes from the request -| config | attributes from the configuration items list -| reply | attributes from the reply -| session-state | attributes that persist over multiple request/response rounds. +| &request | attributes from the request +| &config | attributes from the configuration items list +| &reply | attributes from the reply +| &session-state | attributes that persist over multiple request/response rounds. |=== @@ -115,9 +115,9 @@ thereby saving resources. ``` exec echo { wait = yes - program = "/bin/echo Tmp-String-0 := %{User-Name}" - input_pairs = request - output_pairs = reply + program = "/bin/echo Filter-Id := %{User-Name}" + input_pairs = &request + output_pairs = &reply shell_escape = yes # timeout = 10 } diff --git a/doc/antora/modules/raddb/pages/mods-available/json.adoc b/doc/antora/modules/raddb/pages/mods-available/json.adoc index 781adb23cac..0c4204c657e 100644 --- a/doc/antora/modules/raddb/pages/mods-available/json.adoc +++ b/doc/antora/modules/raddb/pages/mods-available/json.adoc @@ -65,7 +65,7 @@ fields can be accessed using 'map' as shown in the example below. [source, unlang] ---- map json "%rest(GET http://example.org/api/user/%{User-Name})" { - &Tmp-Integer-0 := '$.account number' + &Foo := '$.account number' &Group += '$.groups.*' } ---- @@ -157,8 +157,9 @@ NOTE: Validate parser for everything except unions and expressions. [source,unlang] ---- -&control.Tmp-String-0 := '$.my.json.payload[1]' -&reply.Reply-Message := "Validation of %{control.Tmp-String-0} is %json_jpath_validate($.my.json.payload[1])" +string payload +payload := '$.my.json.payload[1]' +&reply.Reply-Message := "Validation of %{payload} is %json_jpath_validate($.my.json.payload[1])" ---- .Output @@ -177,8 +178,9 @@ Escapes string for use as a JSON string. [source,unlang] ---- -&control.Tmp-String-0 := "caipirinha/gelada" -&reply.Reply-Message := "The string %{control.Tmp-String-0} should be %json_quote(%{control.Tmp-String-0}) to be a valid JSON string." +string path +&path := "caipirinha/gelada" +&reply.Reply-Message := "The string %{path} should be %json_quote(%{path}) to be a valid JSON string." ---- .Output diff --git a/doc/antora/modules/raddb/pages/mods-available/mschap.adoc b/doc/antora/modules/raddb/pages/mods-available/mschap.adoc index a72e8aee079..55de584da55 100644 --- a/doc/antora/modules/raddb/pages/mods-available/mschap.adoc +++ b/doc/antora/modules/raddb/pages/mods-available/mschap.adoc @@ -423,7 +423,7 @@ mschap { # ntlm_auth_username = "username: %mschap(User-Name)" # ntlm_auth_domain = "nt-domain: %mschap(NT-Domain)" # local_cpw = %exec('/path/to/script', %mschap(User-Name), %{MS-CHAP-New-Password.Cleartext}) - local_cpw = %sql("UPDATE radcheck set value='%{MS-CHAP-New-NT-Password}' where username='%{User-Name}' and attribute='Password.NT'") +# local_cpw = %sql("UPDATE radcheck set value='%{MS-CHAP-New-NT-Password}' where username='%{User-Name}' and attribute='Password.NT'") } # use_open_directory = yes # allow_retry = yes diff --git a/raddb/mods-available/client b/raddb/mods-available/client index cf438c6a891..96f8e7b2c6d 100644 --- a/raddb/mods-available/client +++ b/raddb/mods-available/client @@ -54,20 +54,20 @@ # # [source,unlang] # --- -# map client [] { // <1> -# &Tmp-String-0 = 'nas_type' // <2> -# &Tmp-String-1 := 'shortname' // <3> -# &Tmp-String-3 += 'groups' // <4> +# map client [] { // <1> +# &Foo = 'nas_type' // <2> +# &Bar := 'shortname' // <3> +# &Baz += 'groups' // <4> # } # --- # # <1> By default `map client { ... }` will operate on the current client, but alternative # clients can by specified by ``. # <2> Assigns the value of the `nas_type` field from the client definition to -# `&Tmp-String-0` if `&Tmp-String-0` doesn't exist. +# `&Foo` if the `&Foo` attribute does not exist. # <3> Assigns the value of the `shortname` field from the client definition to -# `&Tmp-String-1`. -# <4> Creates multiple `&Tmp-String-3` attributes from a custom group field associated +# `&Bar`. +# <4> Creates multiple `&Baz` attributes from a custom group field associated # with the client. # diff --git a/raddb/mods-available/csv b/raddb/mods-available/csv index 3bfd56f83dc..6b65d26e89b 100644 --- a/raddb/mods-available/csv +++ b/raddb/mods-available/csv @@ -176,7 +176,7 @@ csv { # update reply { &Reply-Message := 'color' - &Tmp-Integer-0 := 'count' + &Foo := 'count' } # diff --git a/raddb/mods-available/echo b/raddb/mods-available/echo index a96c306a4e3..6ba4c3d6be9 100644 --- a/raddb/mods-available/echo +++ b/raddb/mods-available/echo @@ -63,7 +63,7 @@ exec echo { # Dynamic translation is done on this field, so things like # the following example will work. # - program = "/bin/echo Tmp-String-0 := %{User-Name}" + program = "/bin/echo Filter-Id := %{User-Name}" # # input_pairs:: The attributes which are placed into the diff --git a/raddb/mods-available/json b/raddb/mods-available/json index 85e135e6c9b..ecd01652dfd 100644 --- a/raddb/mods-available/json +++ b/raddb/mods-available/json @@ -68,7 +68,7 @@ # [source, unlang] # ---- # map json "%rest(GET http://example.org/api/user/%{User-Name})" { -# &Tmp-Integer-0 := '$.account number' +# &Foo := '$.account number' # &Group += '$.groups.*' # } # ---- @@ -174,8 +174,9 @@ json { # # [source,unlang] # ---- -# &control.Tmp-String-0 := '$.my.json.payload[1]' -# &reply.Reply-Message := "Validation of %{control.Tmp-String-0} is %json_jpath_validate($.my.json.payload[1])" +# string payload +# payload := '$.my.json.payload[1]' +# &reply.Reply-Message := "Validation of %{payload} is %json_jpath_validate($.my.json.payload[1])" # ---- # # .Output @@ -194,8 +195,9 @@ json { # # [source,unlang] # ---- -# &control.Tmp-String-0 := "caipirinha/gelada" -# &reply.Reply-Message := "The string %{control.Tmp-String-0} should be %json_quote(%{control.Tmp-String-0}) to be a valid JSON string." +# string path +# &path := "caipirinha/gelada" +# &reply.Reply-Message := "The string %{path} should be %json_quote(%{path}) to be a valid JSON string." # ---- # # .Output