# 4. Item Attr Operation
#######################################################################
# Use these for case sensitive usernames.
-# authorize_check_query = " \
+# authorize_check_query = "\
# SELECT id, username, attribute, value, op \
# FROM ${authcheck_table} \
# WHERE username = BINARY '%{SQL-User-Name}' \
# ORDER BY id"
-# authorize_reply_query = " \
+# authorize_reply_query = "\
# SELECT id, username, attribute, value, op \
# FROM ${authreply_table} \
# WHERE username = BINARY '%{SQL-User-Name}' \
# The default queries are case insensitive. (for compatibility with
# older versions of FreeRADIUS)
- authorize_check_query = " \
+ authorize_check_query = "\
SELECT id, username, attribute, value, op \
FROM ${authcheck_table} \
WHERE username = '%{SQL-User-Name}' \
ORDER BY id"
- authorize_reply_query = " \
+ authorize_reply_query = "\
SELECT id, username, attribute, value, op \
FROM ${authreply_table} \
WHERE username = '%{SQL-User-Name}' \
ORDER BY id"
# Use these for case sensitive usernames.
-# group_membership_query = " \
+# group_membership_query = "\
# SELECT groupname \
# FROM ${usergroup_table} \
# WHERE username = BINARY '%{SQL-User-Name}' \
# ORDER BY priority"
- group_membership_query = " \
+ group_membership_query = "\
SELECT groupname \
FROM ${usergroup_table} \
WHERE username = '%{SQL-User-Name}' \
ORDER BY priority"
- authorize_group_check_query = " \
+ authorize_group_check_query = "\
SELECT id, groupname, attribute, \
Value, op \
FROM ${groupcheck_table} \
WHERE groupname = '%{Sql-Group}' \
ORDER BY id"
- authorize_group_reply_query = " \
+ authorize_group_reply_query = "\
SELECT id, groupname, attribute, \
value, op \
FROM ${groupreply_table} \
# (alternate in case first query doesn't
# affect any existing rows in the table)
#######################################################################
- accounting_onoff_query = " \
+ accounting_onoff_query = "\
UPDATE ${acct_table1} \
SET \
acctstoptime = FROM_UNIXTIME(%{integer:Event-Timestamp}), \
AND nasipaddress = '%{NAS-IP-Address}' \
AND acctstarttime <= '%S'"
- accounting_update_query = " \
+ accounting_update_query = "\
UPDATE ${acct_table1} \
SET \
acctupdatetime = (@acctupdatetime_old:=acctupdatetime), \
AND username = '%{SQL-User-Name}' \
AND nasipaddress = '%{NAS-IP-Address}'"
- accounting_update_query_alt = " \
+ accounting_update_query_alt = "\
INSERT INTO ${acct_table1} \
(acctsessionid, acctuniqueid, username, \
realm, nasipaddress, nasportid, \
'%{Service-Type}', '%{Framed-Protocol}', \
'%{Framed-IP-Address}')"
- accounting_start_query = " \
+ accounting_start_query = "\
INSERT INTO ${acct_table1} \
(acctsessionid, acctuniqueid, username, \
realm, nasipaddress, nasportid, \
'', '%{Service-Type}', '%{Framed-Protocol}', \
'%{Framed-IP-Address}')"
- accounting_start_query_alt = " \
+ accounting_start_query_alt = "\
UPDATE ${acct_table1} SET \
acctstarttime = FROM_UNIXTIME(%{integer:Event-Timestamp}), \
acctupdatetime = FROM_UNIXTIME(%{integer:Event-Timestamp}), \
AND username = '%{SQL-User-Name}' \
AND nasipaddress = '%{NAS-IP-Address}'"
- accounting_stop_query = " \
+ accounting_stop_query = "\
UPDATE ${acct_table2} SET \
acctstoptime = FROM_UNIXTIME(%{integer:Event-Timestamp}), \
acctsessiontime = '%{Acct-Session-Time}', \
AND username = '%{SQL-User-Name}' \
AND nasipaddress = '%{NAS-IP-Address}'"
- accounting_stop_query_alt = " \
+ accounting_stop_query_alt = "\
INSERT INTO ${acct_table2} \
(acctsessionid, acctuniqueid, username, \
realm, nasipaddress, nasportid, \
#######################################################################
# Uncomment simul_count_query to enable simultaneous use checking
-# simul_count_query = " \
+# simul_count_query = "\
# SELECT COUNT(*) \
# FROM ${acct_table1} \
# WHERE username = '%{SQL-User-Name}' \
# AND acctstoptime IS NULL"
- simul_verify_query = " \
+ simul_verify_query = "\
SELECT radacctid, acctsessionid, username, \
nasipaddress, nasportid, framedipaddress, \
callingstationid, framedprotocol \
# postauth_query - Insert some info after authentication
#######################################################################
- postauth_query = " \
+ postauth_query = "\
INSERT INTO ${postauth_table} \
(username, pass, reply, authdate) \
VALUES ( \