"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "raddb/mods-config/sql/main/mysql/queries.conf" between
freeradius-server-3.0.22.tar.bz2 and freeradius-server-3.0.23.tar.bz2

About: FreeRADIUS Server Project - a high performance and highly configurable RADIUS server.

queries.conf  (freeradius-server-3.0.22.tar.bz2):queries.conf  (freeradius-server-3.0.23.tar.bz2)
# -*- text -*- # -*- text -*-
# #
# main/mysql/queries.conf-- MySQL configuration for default schema (schema.sql) # main/mysql/queries.conf-- MySQL configuration for default schema (schema.sql)
# #
# $Id: 51560a71ed819a95bc0f5ccc352efe69e374f7c5 $ # $Id: af1568a7f05650b426aec426ba8aabf9e3cdb5ca $
# Use the driver specific SQL escape method. # Use the driver specific SQL escape method.
# #
# If you enable this configuration item, the "safe_characters" # If you enable this configuration item, the "safe_characters"
# configuration is ignored. FreeRADIUS then uses the MySQL escape # configuration is ignored. FreeRADIUS then uses the MySQL escape
# functions to escape input strings. The only downside to making this # functions to escape input strings. The only downside to making this
# change is that the MySQL escaping method is not the same the one # change is that the MySQL escaping method is not the same the one
# used by FreeRADIUS. So characters which are NOT in the # used by FreeRADIUS. So characters which are NOT in the
# "safe_characters" list will now be stored differently in the database. # "safe_characters" list will now be stored differently in the database.
# #
skipping to change at line 72 skipping to change at line 72
#event_timestamp_epoch = "%l" #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 # event_timestamp is the SQL snippet for converting an epoch timestamp
# to an SQL date. # to an SQL date.
event_timestamp = "FROM_UNIXTIME(${event_timestamp_epoch})" event_timestamp = "FROM_UNIXTIME(${event_timestamp_epoch})"
####################################################################### #######################################################################
# Query config: Class attribute
#######################################################################
#
# 3.0.22 and later have a "class" column in the accounting table.
#
# However, we do NOT want to break existing configurations by adding
# the Class attribute to the default queries. If we did that, then
# systems using newer versions of the server would fail, because
# there is no "class" column in their accounting tables.
#
# The solution to that is the following "class" subsection. If your
# database has a "class" column for the various tables, then you can
# uncomment the configuration items here. The queries below will
# then automatically insert the Class attribute into radacct,
# radpostauth, etc.
#
class {
#
# Delete the '#' character from each of the configuration
# items in this section. This change puts the Class
# attribute into the various tables. Leave the double-quoted
# string there, as the value for the configuration item.
#
# See also policy.d/accounting, and the "insert_acct_class"
# policy. You will need to list (or uncomment)
# "insert_acct_class" in the "post-auth" section in order to
# create a Class attribute.
#
column_name = # ", class"
packet_xlat = # ", '%{Class}'"
reply_xlat = # ", '%{Reply:Class}'"
}
#######################################################################
# Default profile # Default profile
####################################################################### #######################################################################
# This is the default profile. It is found in SQL by group membership. # This is the default profile. It is found in SQL by group membership.
# That means that this profile must be a member of at least one group # That means that this profile must be a member of at least one group
# which will contain the corresponding check and reply items. # which will contain the corresponding check and reply items.
# This profile will be queried in the authorize section for every user. # This profile will be queried in the authorize section for every user.
# The point is to assign all users a default profile without having to # The point is to assign all users a default profile without having to
# manually add each one to a group that will contain the profile. # manually add each one to a group that will contain the profile.
# The SQL module will also honor the User-Profile attribute. This # The SQL module will also honor the User-Profile attribute. This
# attribute can be set anywhere in the authorize section (ie the users # attribute can be set anywhere in the authorize section (ie the users
skipping to change at line 240 skipping to change at line 274
column_list = "\ column_list = "\
acctsessionid, acctuniqueid, username, \ acctsessionid, acctuniqueid, username, \
realm, nasipaddress, nasportid, \ realm, nasipaddress, nasportid, \
nasporttype, acctstarttime, acctupdatetime, \ nasporttype, acctstarttime, acctupdatetime, \
acctstoptime, acctsessiontime, acctauthentic, \ acctstoptime, acctsessiontime, acctauthentic, \
connectinfo_start, connectinfo_stop, acctinputoctets, \ connectinfo_start, connectinfo_stop, acctinputoctets, \
acctoutputoctets, calledstationid, callingstationid, \ acctoutputoctets, calledstationid, callingstationid, \
acctterminatecause, servicetype, framedprotocol, \ acctterminatecause, servicetype, framedprotocol, \
framedipaddress, framedipv6address, framedipv6prefix, \ framedipaddress, framedipv6address, framedipv6prefix, \
framedinterfaceid, delegatedipv6prefix" framedinterfaceid, delegatedipv6prefix ${..class.column_ name}"
type { type {
accounting-on { accounting-on {
# #
# Bulk terminate all sessions associated with a given NA S # Bulk terminate all sessions associated with a given NA S
# #
query = "\ query = "\
UPDATE ${....acct_table1} \ UPDATE ${....acct_table1} \
SET \ SET \
acctstoptime = ${....event_timestamp}, \ acctstoptime = ${....event_timestamp}, \
skipping to change at line 300 skipping to change at line 334
0, \ 0, \
'%{Called-Station-Id}', \ '%{Called-Station-Id}', \
'%{Calling-Station-Id}', \ '%{Calling-Station-Id}', \
'', \ '', \
'%{Service-Type}', \ '%{Service-Type}', \
NULL, \ NULL, \
'', \ '', \
'', \ '', \
'', \ '', \
'', \ '', \
'')" '' \
${....class.packet_xlat})"
query = "\ query = "\
UPDATE ${....acct_table1} SET \ UPDATE ${....acct_table1} SET \
AcctStartTime = ${....event_timestamp}, \ AcctStartTime = ${....event_timestamp}, \
AcctUpdateTime = ${....event_timestamp}, \ AcctUpdateTime = ${....event_timestamp}, \
ConnectInfo_start = '%{Connect-Info}', \ ConnectInfo_start = '%{Connect-Info}', \
AcctSessionId = '%{Acct-Session-Id}' \ AcctSessionId = '%{Acct-Session-Id}' \
WHERE UserName = '%{SQL-User-Name}' \ WHERE UserName = '%{SQL-User-Name}' \
AND NASIPAddress = '%{%{NAS-IPv6-Address} :-%{NAS-IP-Address}}' \ AND NASIPAddress = '%{%{NAS-IPv6-Address} :-%{NAS-IP-Address}}' \
AND NASPortId = '%{%{NAS-Port-ID}:-%{NAS- Port}}' \ AND NASPortId = '%{%{NAS-Port-ID}:-%{NAS- Port}}' \
skipping to change at line 348 skipping to change at line 383
'0', \ '0', \
'%{Called-Station-Id}', \ '%{Called-Station-Id}', \
'%{Calling-Station-Id}', \ '%{Calling-Station-Id}', \
'', \ '', \
'%{Service-Type}', \ '%{Service-Type}', \
'%{Framed-Protocol}', \ '%{Framed-Protocol}', \
'%{Framed-IP-Address}', \ '%{Framed-IP-Address}', \
'%{Framed-IPv6-Address}', \ '%{Framed-IPv6-Address}', \
'%{Framed-IPv6-Prefix}', \ '%{Framed-IPv6-Prefix}', \
'%{Framed-Interface-Id}', \ '%{Framed-Interface-Id}', \
'%{Delegated-IPv6-Prefix}')" '%{Delegated-IPv6-Prefix}' \
${....class.packet_xlat})"
# #
# When using "sql_session_start", you should comment out # When using "sql_session_start", you should comment out
# the previous query, and enable this one. # the previous query, and enable this one.
# #
# Just change the previous query to "-query", # Just change the previous query to "-query",
# and this one to "query". The previous one # and this one to "query". The previous one
# will be ignored, and this one will be # will be ignored, and this one will be
# enabled. # enabled.
# #
skipping to change at line 452 skipping to change at line 488
'%{%{Acct-Output-Gigawords}:-0}' << 32 | '%{%{Acct-Output-Octets}:-0}', \ '%{%{Acct-Output-Gigawords}:-0}' << 32 | '%{%{Acct-Output-Octets}:-0}', \
'%{Called-Station-Id}', \ '%{Called-Station-Id}', \
'%{Calling-Station-Id}', \ '%{Calling-Station-Id}', \
'', \ '', \
'%{Service-Type}', \ '%{Service-Type}', \
'%{Framed-Protocol}', \ '%{Framed-Protocol}', \
'%{Framed-IP-Address}', \ '%{Framed-IP-Address}', \
'%{Framed-IPv6-Address}', \ '%{Framed-IPv6-Address}', \
'%{Framed-IPv6-Prefix}', \ '%{Framed-IPv6-Prefix}', \
'%{Framed-Interface-Id}', \ '%{Framed-Interface-Id}', \
'%{Delegated-IPv6-Prefix}')" '%{Delegated-IPv6-Prefix}' \
${....class.packet_xlat})"
# #
# When using "sql_session_start", you should comment out # When using "sql_session_start", you should comment out
# the previous query, and enable this one. # the previous query, and enable this one.
# #
# Just change the previous query to "-query", # Just change the previous query to "-query",
# and this one to "query". The previous one # and this one to "query". The previous one
# will be ignored, and this one will be # will be ignored, and this one will be
# enabled. # enabled.
# #
skipping to change at line 540 skipping to change at line 577
'%{%{Acct-Output-Gigawords}:-0}' << 32 | '%{%{Acct-Output-Octets}:-0}', \ '%{%{Acct-Output-Gigawords}:-0}' << 32 | '%{%{Acct-Output-Octets}:-0}', \
'%{Called-Station-Id}', \ '%{Called-Station-Id}', \
'%{Calling-Station-Id}', \ '%{Calling-Station-Id}', \
'%{Acct-Terminate-Cause}', \ '%{Acct-Terminate-Cause}', \
'%{Service-Type}', \ '%{Service-Type}', \
'%{Framed-Protocol}', \ '%{Framed-Protocol}', \
'%{Framed-IP-Address}', \ '%{Framed-IP-Address}', \
'%{Framed-IPv6-Address}', \ '%{Framed-IPv6-Address}', \
'%{Framed-IPv6-Prefix}', \ '%{Framed-IPv6-Prefix}', \
'%{Framed-Interface-Id}', \ '%{Framed-Interface-Id}', \
'%{Delegated-IPv6-Prefix}')" '%{Delegated-IPv6-Prefix}' \
${....class.packet_xlat})"
# #
# When using "sql_session_start", you should comment out # When using "sql_session_start", you should comment out
# the previous query, and enable this one. # the previous query, and enable this one.
# #
# Just change the previous query to "-query", # Just change the previous query to "-query",
# and this one to "query". The previous one # and this one to "query". The previous one
# will be ignored, and this one will be # will be ignored, and this one will be
# enabled. # enabled.
# #
skipping to change at line 604 skipping to change at line 642
# postauth_query - Insert some info after authentication # postauth_query - Insert some info after authentication
####################################################################### #######################################################################
post-auth { post-auth {
# Write SQL queries to a logfile. This is potentially useful for bulk ins erts # Write SQL queries to a logfile. This is potentially useful for bulk ins erts
# when used with the rlm_sql_null driver. # when used with the rlm_sql_null driver.
# logfile = ${logdir}/post-auth.sql # logfile = ${logdir}/post-auth.sql
query = "\ query = "\
INSERT INTO ${..postauth_table} \ INSERT INTO ${..postauth_table} \
(username, pass, reply, authdate) \ (username, pass, reply, authdate ${..class.column_name}) \
VALUES ( \ VALUES ( \
'%{SQL-User-Name}', \ '%{SQL-User-Name}', \
'%{%{User-Password}:-%{Chap-Password}}', \ '%{%{User-Password}:-%{Chap-Password}}', \
'%{reply:Packet-Type}', \ '%{reply:Packet-Type}', \
'%S.%M')" '%S.%M' \
${..class.reply_xlat})"
} }
 End of changes. 9 change blocks. 
8 lines changed or deleted 47 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)