From: Alan T. DeKok Date: Thu, 6 Mar 2025 15:19:38 +0000 (-0500) Subject: remove '&' from csv X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6544ebee6799104c65547755e352e201f8a732d9;p=thirdparty%2Ffreeradius-server.git remove '&' from csv --- diff --git a/doc/antora/modules/reference/pages/raddb/mods-available/csv.adoc b/doc/antora/modules/reference/pages/raddb/mods-available/csv.adoc index 21dba59ef4..2c6bfbad34 100644 --- a/doc/antora/modules/reference/pages/raddb/mods-available/csv.adoc +++ b/doc/antora/modules/reference/pages/raddb/mods-available/csv.adoc @@ -12,7 +12,7 @@ WARNING: Multi-line fields are NOT allowed. The CSV map can be used in a `map` section, as in the following example. - map csv &User-Name { + map csv User-Name { } The argument to "map" is dynamically expanded. The result is taken @@ -117,7 +117,7 @@ tree. If a data type other than the native type of `key` expression is needed, the casting operator can be used. For example: -a key value of `&reply.Reply-Message`. +a key value of `(ipv4addr) reply.Reply-Message`. would result in a prefix trie being used for lookups, and the `string` value of the `link:https://freeradius.org/rfc/rfc2865.html#Reply-Message[Reply-Message]` attribute being parsed as CIDR notation. @@ -170,9 +170,9 @@ Where `csv` is the name of the module, and `key` is an expansion as given the the key` field above. For example, the map could look like this: -map csv &User-Name { -&reply.Reply-Message := 'color' -&my-integer := 'count' +map csv User-Name { +reply.Reply-Message := 'color' +my-integer := 'count' } This map does the same operations as the key / update @@ -197,10 +197,10 @@ csv { allow_multiple_keys = no fields = "name,size,color,count" index_field = "name" - key = &User-Name + key = User-Name update reply { - &Reply-Message := 'color' - &my-integer := 'count' + Reply-Message := 'color' + my-integer := 'count' } } ``` diff --git a/raddb/mods-available/csv b/raddb/mods-available/csv index 362fda22ed..a360d9fd20 100644 --- a/raddb/mods-available/csv +++ b/raddb/mods-available/csv @@ -15,7 +15,7 @@ # # The CSV map can be used in a `map` section, as in the following example. # -# map csv &User-Name { +# map csv User-Name { # Attribute-Name := field1 # Attribute-Name := field2 # ... @@ -130,7 +130,7 @@ csv { # If a data type other than the native type of `key` expression # is needed, the casting operator can be used. # For example: - # a key value of `&reply.Reply-Message`. + # a key value of `(ipv4addr) reply.Reply-Message`. # would result in a prefix trie being used for lookups, and the # `string` value of the `Reply-Message` attribute being parsed as # CIDR notation. @@ -140,7 +140,7 @@ csv { # parsed to the final data type only when the `csv` module # is run, either in-place, or as a `map`. # - key = &User-Name + key = User-Name # # ### Mapping of CSV fields to attributes. @@ -175,8 +175,8 @@ csv { # update { ... }:: # update reply { - &Reply-Message := 'color' - &my-integer := 'count' + Reply-Message := 'color' + my-integer := 'count' } # @@ -188,9 +188,9 @@ csv { # as given the the key` field above. For example, the map could # look like this: # - # map csv &User-Name { - # &reply.Reply-Message := 'color' - # &my-integer := 'count' + # map csv User-Name { + # reply.Reply-Message := 'color' + # my-integer := 'count' # } # # This map does the same operations as the key / update diff --git a/src/tests/keywords/map b/src/tests/keywords/map index 4b0c464af4..2c7e446003 100644 --- a/src/tests/keywords/map +++ b/src/tests/keywords/map @@ -3,7 +3,7 @@ string CSV-Result # # PRE: map-2arg-error map-empty-error map-module-error map-field-error # -map csv &User-Name { +map csv User-Name { CSV-Result := 'field3' }