From: Alan T. DeKok Date: Fri, 16 Aug 2019 14:56:02 +0000 (-0400) Subject: now that we suppress stupid warnings, fix the docs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=622094cd7ed515ecb0a8211311cfef8d268ef994;p=thirdparty%2Ffreeradius-server.git now that we suppress stupid warnings, fix the docs perl -p -i -e 's/`\+\%{(.*?)}\+`/`%{$1}`/g' $(find . -name "*.adoc" -print) --- diff --git a/doc/antora/modules/unlang/pages/regex.adoc b/doc/antora/modules/unlang/pages/regex.adoc index 8870f1fd760..97bcbc9d57b 100644 --- a/doc/antora/modules/unlang/pages/regex.adoc +++ b/doc/antora/modules/unlang/pages/regex.adoc @@ -113,13 +113,13 @@ library the server was built with. Multiple flags may be specified per When the `=~` or `!~` operators are used, then parentheses in the regular expression will sub capture groups, which contain part of the subject string. -The special expansion `+%{0}+` expands to the portion of the subject that +The special expansion `%{0}` expands to the portion of the subject that matched. The expansions + -`+%{1}+`..`+%{32}+` expand to the contents of any subcapture groups. +`%{1}`..`%{32}` expand to the contents of any subcapture groups. When using libpcre[2], named capture groups may also be accessed using the built-in expansion + -`+%{regex:}+`. +`%{regex:}`. Please see the xref:xlat/predefined.adoc#_0_32[xlat documentation] for more information on regular expression matching. diff --git a/doc/antora/modules/unlang/pages/xlat/alternation.adoc b/doc/antora/modules/unlang/pages/xlat/alternation.adoc index 897ca903510..cba645331b8 100644 --- a/doc/antora/modules/unlang/pages/xlat/alternation.adoc +++ b/doc/antora/modules/unlang/pages/xlat/alternation.adoc @@ -3,22 +3,22 @@ Alternation syntax similar to that used in Unix shells may also be used: -`+%{%{Foo}:-bar}+` +`%{%{Foo}:-bar}` -This code returns the value of `+%{Foo}+`, if it has a value. +This code returns the value of `%{Foo}`, if it has a value. Otherwise, it returns a literal string bar. -`+%{%{Foo}:-%{Bar}}+` +`%{%{Foo}:-%{Bar}}` -This code returns the value of `+%{Foo}+`, if it has a value. -Otherwise, it returns the expansion of `+%{Bar}+`. +This code returns the value of `%{Foo}`, if it has a value. +Otherwise, it returns the expansion of `%{Bar}`. These conditional expansions can be nested to almost any depth, such -as with `+%{%{One}:-%{%{Two}:-%{Three}}}+`. +as with `%{%{One}:-%{%{Two}:-%{Three}}}`. .Examples -`+%{%{Stripped-User-Name}:-%{User-Name}}+` + -`+%{%{Framed-IP-Address}:-}+` +`%{%{Stripped-User-Name}:-%{User-Name}}` + +`%{%{Framed-IP-Address}:-}` // Copyright (C) 2019 Network RADIUS SAS. Licenced under CC-by-NC 4.0. // Development of this documentation was sponsored by Network RADIUS SAS. diff --git a/doc/antora/modules/unlang/pages/xlat/attribute.adoc b/doc/antora/modules/unlang/pages/xlat/attribute.adoc index 83c0e5c88d1..b0ce5d24d96 100644 --- a/doc/antora/modules/unlang/pages/xlat/attribute.adoc +++ b/doc/antora/modules/unlang/pages/xlat/attribute.adoc @@ -3,8 +3,8 @@ Attributes in a list may be referenced via one of the following two syntaxes: -`+%{Attribute-Name}+` + -`+%{:Attribute-Name}+` +`%{Attribute-Name}` + +`%{:Attribute-Name}` The `:` prefix is optional. If given, it must be a valid reference to an xref:list.adoc[attribute list]. @@ -24,9 +24,9 @@ reference is replacedd with an empty string. .Examples -`+%{User-Name}+` + +`%{User-Name}` + `+%{request:User-Name} # same as above+` + -`+%{reply:User-Name}+` + +`%{reply:User-Name}` + `+%{outer.request:User-Name} # from inside of a TTLS/PEAP tunnel+` Examples of using references inside of a string: diff --git a/doc/antora/modules/unlang/pages/xlat/index.adoc b/doc/antora/modules/unlang/pages/xlat/index.adoc index 4180f566e49..297cd691390 100644 --- a/doc/antora/modules/unlang/pages/xlat/index.adoc +++ b/doc/antora/modules/unlang/pages/xlat/index.adoc @@ -27,7 +27,7 @@ This feature is used to create policies which refer to concepts rather than to specific values. For example, a policy can be created that refers to the User-Name in a request, via: -`+%{User-Name}+` +`%{User-Name}` This string expansion is done only for double-quoted strings and for the back-tick operator. diff --git a/doc/antora/modules/unlang/pages/xlat/module.adoc b/doc/antora/modules/unlang/pages/xlat/module.adoc index 93d57926672..f48379d4835 100644 --- a/doc/antora/modules/unlang/pages/xlat/module.adoc +++ b/doc/antora/modules/unlang/pages/xlat/module.adoc @@ -12,7 +12,7 @@ expanded to allow for additional flexibility. .Examples -`+%{sql:SELECT name FROM mytable WHERE username = %{User-Name}}+` +`%{sql:SELECT name FROM mytable WHERE username = %{User-Name}}` // Copyright (C) 2019 Network RADIUS SAS. Licenced under CC-by-NC 4.0. // Development of this documentation was sponsored by Network RADIUS SAS. diff --git a/doc/antora/modules/unlang/pages/xlat/predefined.adoc b/doc/antora/modules/unlang/pages/xlat/predefined.adoc index b1ce65b3112..49fdec302b4 100644 --- a/doc/antora/modules/unlang/pages/xlat/predefined.adoc +++ b/doc/antora/modules/unlang/pages/xlat/predefined.adoc @@ -767,8 +767,8 @@ The md5 of Caipirinha in hex is 14840b6d647c7c98a3e732f833d86ea9 === +%{0}+..+%{32}+ -`+%{0}+` expands to the portion of the subject that matched the last regular -expression evaluated. `+%{1}+`..`+%{32}+` expand to the contents of any capture +`%{0}` expands to the portion of the subject that matched the last regular +expression evaluated. `%{1}`..`%{32}` expand to the contents of any capture groups in the pattern. Every time a regular expression is evaluated, whether it matches or not, @@ -841,7 +841,7 @@ The destination IPv4 or IPv6 address of the packet. See also the expansions `%{listen:ipaddr}` and `%{listen:ipv6addr}`. If the socket is listening on a "wildcard" address, then these two expansions will be different, as follows: the `%{listen:ipaddr}` will be the wildcard -address and `+%{Packet-DST-IP-Address}+` will be the unicast address to +address and `%{Packet-DST-IP-Address}` will be the unicast address to which the packet was sent. === +%{Packet-SRC-Port} and %{Packet-DST-Port}+ diff --git a/doc/antora/modules/upgrade/pages/index.adoc b/doc/antora/modules/upgrade/pages/index.adoc index 6c632baa96f..75ae0c300a4 100644 --- a/doc/antora/modules/upgrade/pages/index.adoc +++ b/doc/antora/modules/upgrade/pages/index.adoc @@ -383,7 +383,7 @@ The v3 server has warned about using non prefixed attribute references for some time. If users have paid attention to those warnings, few modifications will be required. -Use of attributes in xlats e.g. `+%{User-Name}+` remains unchanged. +Use of attributes in xlats e.g. `%{User-Name}` remains unchanged. There is no plan to require prefixes here. As of v3, the preferred format for `+unknown+` attributes is @@ -570,10 +570,10 @@ checks to see if you want to execute the module. Allow `+&Attr-Name[*]+` to mean _sum_. Previously, it just referred to the first attribute. -Using `+%{expr:0 + &Attr-Name[*]}+` will cause it to return the sum of +Using `%{expr:0 + &Attr-Name[*]}` will cause it to return the sum of the values of all attributes with the given name. -Note that `+%{expr:1 * &Attr-Name[*]}+` does _not_ mean repeated +Note that `%{expr:1 * &Attr-Name[*]}` does _not_ mean repeated multiplication. Instead, the sum of the attributes is taken as before, and then the result is multiplied by one.