]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
get rid of Tmp-* in configuration and examples
authorAlan T. DeKok <aland@freeradius.org>
Wed, 25 Oct 2023 20:59:03 +0000 (16:59 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 27 Oct 2023 00:06:43 +0000 (20:06 -0400)
doc/antora/modules/raddb/pages/mods-available/client.adoc
doc/antora/modules/raddb/pages/mods-available/csv.adoc
doc/antora/modules/raddb/pages/mods-available/echo.adoc
doc/antora/modules/raddb/pages/mods-available/json.adoc
doc/antora/modules/raddb/pages/mods-available/mschap.adoc
raddb/mods-available/client
raddb/mods-available/csv
raddb/mods-available/echo
raddb/mods-available/json

index 9942fd1eb0ac4115b76db0d632f501f2bbba6f27..3335590c3b0b3cab91fd01208d69adc3fb3f8eae 100644 (file)
@@ -51,20 +51,20 @@ Maps arbitrary fields from a client definition to attributes in the current requ
 
 [source,unlang]
 ---
-map client [<ipaddr>] {            // <1>
-     &Tmp-String-0 = 'nas_type'    // <2>
-     &Tmp-String-1 := 'shortname'  // <3>
-     &Tmp-String-3 += 'groups'     // <4>
+map client [<ipaddr>] {      // <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 `<ipaddr>`.
 <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.
 
 
index ccb9994c96de9c2600eeca8347b4a8b0345e2d73..b1a2800ff06125bb74898ceeac8aec73a400b0f5 100644 (file)
@@ -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'
        }
 }
 ```
index 3789b8f214e86918a85436a4871b1330598d08a6..8e46a3ba2bcce3335185d6902a0c76d0c349c9cd 100644 (file)
@@ -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
 }
index 781adb23cac61fdb5183986b6a90c6c2b8e320df..0c4204c657e8b17cd531acf58c0729b39495ed44 100644 (file)
@@ -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
index a72e8aee07980e19eb041c4c3dab0422ffded5ff..55de584da55acd90d743b0dcee88defea46d6f43 100644 (file)
@@ -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
index cf438c6a891d4613c823e05d243ee95b78bb8d6a..96f8e7b2c6d2a2fac247f8859a3991450d3411c9 100644 (file)
 #
 #  [source,unlang]
 #  ---
-#  map client [<ipaddr>] {            // <1>
-#       &Tmp-String-0 = 'nas_type'    // <2>
-#       &Tmp-String-1 := 'shortname'  // <3>
-#       &Tmp-String-3 += 'groups'     // <4>
+#  map client [<ipaddr>] {      // <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 `<ipaddr>`.
 #  <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.
 
 #
index 3bfd56f83dcd502efe3169736e3e295dfe9fccd9..6b65d26e89b48176c73c89f0e84ce80d097702df 100644 (file)
@@ -176,7 +176,7 @@ csv {
        #
        update reply {
               &Reply-Message := 'color'
-              &Tmp-Integer-0 := 'count'
+              &Foo := 'count'
        }
 
        #
index a96c306a4e361d21e0b39c4f9dcd6a6ad7a50621..6ba4c3d6be9d1be997087bb14c967d87c04a8460 100644 (file)
@@ -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
index 85e135e6c9bb92a2da58b30d9e135bd913d5cb68..ecd01652dfdaacbb819bbc02235713b982741235 100644 (file)
@@ -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