From: Scott Armitage Date: Sun, 21 Oct 2012 16:13:31 +0000 (+0100) Subject: Changed cui policy. Changed the updating of the cui in the database to occur in the... X-Git-Tag: release_3_0_0_beta1~1656^2^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdb47b332087bacc5f1bbc341f3c3022a8ec3be9;p=thirdparty%2Ffreeradius-server.git Changed cui policy. Changed the updating of the cui in the database to occur in the cui.post-auth. Changed mods-available/cui module name --- diff --git a/raddb/mods-available/cui b/raddb/mods-available/cui index fc444ff71cd..f64cc3d00c1 100644 --- a/raddb/mods-available/cui +++ b/raddb/mods-available/cui @@ -8,7 +8,7 @@ # Schema raddb/sql/DB/cui.sql # Queries raddb/sql/DB/cui.conf # -sql cui { +sql cuisql { # # Set the database to one of: # diff --git a/raddb/policy.d/cui b/raddb/policy.d/cui index d3faf67c72f..b0df5b3391f 100644 --- a/raddb/policy.d/cui +++ b/raddb/policy.d/cui @@ -86,10 +86,21 @@ cui.post-auth { update reply { User-Name-="%{reply:User-Name}" } + # + # The section below will store a CUI for the User in the DB. + # You need to configure the cuisql module and your database for this to work. + # If your NAS-es can do CUI based accounting themselves + # or you do not care about accounting, comment out the three lines below. + # + if (reply:Chargeable-User-Identity) { + cuisql + } } } - +# +# If your NAS-es can do CUI based accounting or you do not care about +# accounting then just comment out the call to cui in ...... # # If we had stored a CUI for the User, add it to the request. # @@ -109,16 +120,6 @@ cui.accounting { # this CUI. # if (Chargeable-User-Identity && (Chargeable-User-Identity != "")) { - cui + cuisql } } - -# -# If there is a CUI attribute in the reply, add it to the DB. -# -cui_updatedb { - if (reply:Chargeable-User-Identity) { - cui - } -} -