]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Changed cui policy. Changed the updating of the cui in the database to occur in the...
authorScott Armitage <s.p.armitage@lboro.ac.uk>
Sun, 21 Oct 2012 16:13:31 +0000 (17:13 +0100)
committerScott Armitage <s.p.armitage@lboro.ac.uk>
Sun, 21 Oct 2012 16:19:37 +0000 (17:19 +0100)
raddb/mods-available/cui
raddb/policy.d/cui

index fc444ff71cda1756e0683f10f0d877e33efda2d0..f64cc3d00c1922cc5f281ba95a3089c9b89807d5 100644 (file)
@@ -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:
        #
index d3faf67c72f81db7ea134dbe7691d0c7b33d10ed..b0df5b3391f629a06bf0dac9edd85ecb03512be1 100644 (file)
@@ -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
-       }
-}
-