]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
move to new function syntax
authorAlan T. DeKok <aland@freeradius.org>
Sat, 30 Sep 2023 20:25:16 +0000 (16:25 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 30 Sep 2023 20:25:16 +0000 (16:25 -0400)
raddb/mods-config/perl/example.pl
raddb/mods-config/sql/cui/mysql/queries.conf
raddb/mods-config/sql/cui/postgresql/queries.conf
raddb/mods-config/sql/cui/sqlite/queries.conf
raddb/mods-config/sql/main/cassandra/queries.conf
raddb/mods-config/sql/main/mssql/queries.conf
raddb/mods-config/sql/main/mysql/queries.conf
raddb/mods-config/sql/main/oracle/queries.conf
raddb/mods-config/sql/main/postgresql/extras/voip-postpaid.conf
raddb/mods-config/sql/main/postgresql/queries.conf
raddb/mods-config/sql/main/sqlite/queries.conf

index 3fa1467467fd2bafcb36c784fbdefcb558439b5a..8412765af4258e39159012b2a32b12536c3d86fa 100644 (file)
@@ -126,7 +126,7 @@ sub authenticate {
                return RLM_MODULE_REJECT;
        } else {
                # Accept user and set some attribute
-               if (&radiusd::xlat("%(client:group)") eq 'UltraAllInclusive') {
+               if (&radiusd::xlat("%client(group)") eq 'UltraAllInclusive') {
                        # User called from NAS with unlim plan set, set higher limits
                        $RAD_REPLY{'h323-credit-amount'} = "1000000";
                } else {
index ce53b4f8b3c0226cf91b2088996e69d253a27e2d..7e9ca48ae7deb314bd7b8d45e6fa2dfd309f8b97 100644 (file)
@@ -18,7 +18,7 @@ post-auth {
 }
 
 accounting {
-       reference = "%{tolower:type.%{Acct-Status-Type}.query}"
+       reference = "%tolower(type.%{Acct-Status-Type}.query)"
        type {
                start {
                        query = "\
index d2959e34a44ed3f4914f3700e8df526f8212ef6d..cbad2385cb0b0065a8d8b2c02df96fae80aafba2 100644 (file)
@@ -20,7 +20,7 @@ post-auth {
 }
 
 accounting {
-       reference = "%{tolower:type.%{Acct-Status-Type}.query}"
+       reference = "%tolower(type.%{Acct-Status-Type}.query)"
        type {
                start {
                        query = "\
index eff87b4f361f10383c4bfef87d96ce09aaefc493..158af580e85dd978f430f925946483b7026d9a15 100644 (file)
@@ -15,7 +15,7 @@ post-auth {
 }
 
 accounting {
-       reference = "%{tolower:type.%{Acct-Status-Type}.query}"
+       reference = "%tolower(type.%{Acct-Status-Type}.query)"
        type {
                start {
                        query = "\
index f15d4d3f74a1dfdb7ac7b7765c55f08faee74783..63dddb4eee48ac9563754b3bf3883205608adffc 100644 (file)
@@ -49,12 +49,12 @@ sql_user_name = "%{User-Name}"
 # distrust the provided Event-Timestamp.
 #event_timestamp_epoch = "%l"
 
-event_timestamp_epoch = "%{%(integer:%{Event-Timestamp}):-%l}"
+event_timestamp_epoch = "%{%integer(%{Event-Timestamp}):-%l}"
 
 # event_timestamp is the SQL snippet for converting an epoch timestamp
 # to an SQL date.
 
-event_timestamp = "%{expr:${event_timestamp_epoch} * 1000}"
+event_timestamp = "%expr(${event_timestamp_epoch} * 1000)"
 
 #######################################################################
 # Default profile
@@ -143,7 +143,7 @@ authorize_group_reply_query = "\
 # as INSERTS are really UPSERTS so we can work around it.
 #######################################################################
 accounting {
-       reference = "%{tolower:type.%{Acct-Status-Type}.query}"
+       reference = "%tolower(type.%{Acct-Status-Type}.query)"
 
        # Write SQL queries to a logfile. This is potentially useful for bulk inserts
        # when used with the rlm_sql_null driver.
@@ -231,7 +231,7 @@ accounting {
                                        acctstarttime \
                                ) VALUES ( \
                                        '%{Acct-Unique-Session-Id}', \
-                                       %{expr:(${....event_timestamp_epoch} - &Acct-Session-Time) * 1000} \
+                                       %expr((${....event_timestamp_epoch} - &Acct-Session-Time) * 1000) \
                                ) IF NOT EXISTS; \
                                INSERT INTO ${....acct_table1} ( \
                                        acctuniqueid, \
@@ -269,8 +269,8 @@ accounting {
                                        null, \
                                        '%{Acct-Authentic}', \
                                        '%{Connect-Info}', \
-                                       %{expr:(&Acct-Input-Gigawords << 32) | &Acct-Input-Octets}, \
-                                       %{expr:(&Acct-Output-Gigawords << 32) | &Acct-Output-Octets}, \
+                                       %expr((&Acct-Input-Gigawords << 32) | &Acct-Input-Octets), \
+                                       %expr((&Acct-Output-Gigawords << 32) | &Acct-Output-Octets), \
                                        '%{Called-Station-Id}', \
                                        '%{Calling-Station-Id}', \
                                        '%{Service-Type}', \
@@ -293,7 +293,7 @@ accounting {
                                        acctstarttime \
                                ) VALUES ( \
                                        '%{Acct-Unique-Session-Id}', \
-                                       %{expr:(${....event_timestamp_epoch} - &Acct-Session-Time) * 1000} \
+                                       %expr((${....event_timestamp_epoch} - &Acct-Session-Time) * 1000) \
                                ) IF NOT EXISTS; \
                                INSERT INTO ${....acct_table1} ( \
                                        acctuniqueid, \
@@ -332,8 +332,8 @@ accounting {
                                        ${....event_timestamp}, \
                                        '%{Acct-Authentic}', \
                                        '%{Connect-Info}', \
-                                       %{expr:(&Acct-Input-Gigawords << 32) | &Acct-Input-Octets}, \
-                                       %{expr:(&Acct-Output-Gigawords << 32) | &Acct-Output-Octets}, \
+                                       %expr((&Acct-Input-Gigawords << 32) | &Acct-Input-Octets), \
+                                       %expr((&Acct-Output-Gigawords << 32) | &Acct-Output-Octets), \
                                        '%{Called-Station-Id}', \
                                        '%{Calling-Station-Id}', \
                                        '%{Service-Type}', \
@@ -370,6 +370,6 @@ post-auth {
                        '%{SQL-User-Name}', \
                        '%{%{User-Password}:-%{Chap-Password}}', \
                        '%{reply.Packet-Type}', \
-                       '%{expr:%l * 1000 + %M / 1000}', \
+                       '%expr(%l * 1000 + %M / 1000)', \
                        '%{reply.Class}')"
 }
index f17a5ead1da6d7b06055a84ef807adc1e8ba105f..6689c44431f618fc2f798c93f16607dd85e2cae9 100644 (file)
@@ -38,7 +38,7 @@ sql_user_name = "%{User-Name}"
 # distrust the provided Event-Timestamp.
 #event_timestamp_epoch = "%l"
 
-event_timestamp_epoch = "%{%(integer:%{Event-Timestamp}):-%l}"
+event_timestamp_epoch = "%{%integer(%{Event-Timestamp}):-%l}"
 
 # event_timestamp is the SQL snippet for converting an epoch timestamp
 # to an SQL date.
@@ -141,7 +141,7 @@ simul_verify_query = "\
 # combination of attributes, or custom 'Acct-Status-Type' values.
 #######################################################################
 accounting {
-       reference = "%{tolower:type.%{Acct-Status-Type}.query}"
+       reference = "%tolower(type.%{Acct-Status-Type}.query)"
 
        # Write SQL queries to a logfile. This is potentially useful for bulk inserts
        # when used with the rlm_sql_null driver.
@@ -406,6 +406,6 @@ post-auth {
                        '%{User-Name}', \
                        '%{%{User-Password}:-CHAP-PASSWORD}', \
                        '%{reply.Packet-Type}', \
-                       '%S.%{expr:%M / 1000}', \
+                       '%S.%expr(%M / 1000)', \
                        '%{reply.Class}')"
 }
index 964ba800449fb1bc3c0e6daf9cc2f705be4349b3..a6a103429558d57afd0bcc0938bdb86595c3907f 100644 (file)
@@ -1,4 +1,4 @@
-#  -*- text -*-
+]#  -*- text -*-
 #
 #  main/mysql/queries.conf-- MySQL configuration for default schema (schema.sql)
 #
@@ -49,7 +49,7 @@ sql_user_name = "%{User-Name}"
 # distrust the provided Event-Timestamp.
 #event_timestamp_epoch = "%l"
 
-event_timestamp_epoch = "%{%(integer:%{Event-Timestamp}):-%l}"
+event_timestamp_epoch = "%{%integer(%{Event-Timestamp}):-%l}"
 
 # event_timestamp is the SQL snippet for converting an epoch timestamp
 # to an SQL date.
@@ -167,7 +167,7 @@ authorize_group_reply_query = "\
 # combination of attributes, or custom 'Acct-Status-Type' values.
 #######################################################################
 accounting {
-       reference = "%{tolower:type.%{Acct-Status-Type}.query}"
+       reference = "%tolower(type.%{Acct-Status-Type}.query)"
 
        # Write SQL queries to a logfile. This is potentially useful for bulk inserts
        # when used with the rlm_sql_null driver.
index df77a5718f9255ee72210faa608e3887f355f6c8..66a6c19780f749b44f9cdd2d3478d689a830031f 100644 (file)
@@ -33,7 +33,7 @@ sql_user_name = "%{User-Name}"
 # distrust the provided Event-Timestamp.
 #event_timestamp_epoch = "%l"
 
-event_timestamp_epoch = "%{%(integer:%{Event-Timestamp}):-%l}"
+event_timestamp_epoch = "%{%integer(%{Event-Timestamp}):-%l}"
 
 # event_timestamp is the SQL snippet for converting an epoch timestamp
 # to an SQL date.
@@ -148,7 +148,7 @@ group_membership_query = "\
 # combination of attributes, or custom 'Acct-Status-Type' values.
 #######################################################################
 accounting {
-       reference = "%{tolower:type.%{Acct-Status-Type}.query}"
+       reference = "%tolower(type.%{Acct-Status-Type}.query)"
 
        # Write SQL queries to a logfile. This is potentially useful for bulk inserts
        # when used with the rlm_sql_null driver.
index c5cb4c38f0428c6277c8e17441c699ba485246cf..acf702ff3d42f8a06664e140ebccc8c514a944ad 100644 (file)
@@ -25,7 +25,7 @@
        sql_user_name = "%{User-Name}"
 
        accounting {
-               reference = "%{tolower:type.%{Acct-Status-Type}.query}"
+               reference = "%tolower(type.%{Acct-Status-Type}.query)"
 
                # Write SQL queries to a logfile. This is potentially useful for bulk inserts
                # when used with the rlm_sql_null driver.
index 9c5e6386d4c2934fd3fdb72237a5ea63092e0cde..ce82cab572447a0b3014983f9cc5fce2e783c1f8 100644 (file)
@@ -39,7 +39,7 @@ sql_user_name = "%{User-Name}"
 # distrust the provided Event-Timestamp.
 #event_timestamp_epoch = "%l"
 
-event_timestamp_epoch = "%{%(integer:%{Event-Timestamp}):-%l}"
+event_timestamp_epoch = "%{%integer(%{Event-Timestamp}):-%l}"
 
 # event_timestamp is the SQL snippet for converting an epoch timestamp
 # to an SQL date.
@@ -191,7 +191,7 @@ group_membership_query = "\
 #######################################################################
 
 accounting {
-       reference = "%{tolower:type.%{%{Acct-Status-Type}:-none}.query}"
+       reference = "%tolower(type.%{%{Acct-Status-Type}:-none}.query)"
 
        # Write SQL queries to a logfile. This is potentially useful for bulk inserts
        # when used with the rlm_sql_null driver.
index 7f868c15791c7e195b9012c7355df84b3ebd4206..2b3efb6de0031222dd823224b8b955fb64542223 100644 (file)
@@ -38,7 +38,7 @@ sql_user_name = "%{User-Name}"
 # distrust the provided Event-Timestamp.
 #event_timestamp_epoch = "%l"
 
-event_timestamp_epoch = "%{%(integer:%{Event-Timestamp}):-%l}"
+event_timestamp_epoch = "%{%integer(%{Event-Timestamp}):-%l}"
 
 # event_timestamp is the SQL snippet for converting an epoch timestamp
 # to an SQL date.
@@ -162,7 +162,7 @@ authorize_group_reply_query = "\
 # combination of attributes, or custom 'Acct-Status-Type' values.
 #######################################################################
 accounting {
-       reference = "%{tolower:type.%{Acct-Status-Type}.query}"
+       reference = "%tolower(type.%{Acct-Status-Type}.query)"
 
        # Write SQL queries to a logfile. This is potentially useful for bulk inserts
        # when used with the rlm_sql_null driver.