"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "raddb/mods-config/sql/main/mssql/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/mssql/queries.conf -- MSSQL configuration for default schema (schema.sql ) # main/mssql/queries.conf -- MSSQL configuration for default schema (schema.sql )
# #
# $Id: ee21f740e5a385071560e48fd3b9c57e11be09d1 $ # $Id: a69e6022a9d8fae1eab8004f25d6057401a0147e $
# Safe characters list for sql queries. Everything else is replaced # Safe characters list for sql queries. Everything else is replaced
# with their mime-encoded equivalents. # with their mime-encoded equivalents.
# The default list should be ok # The default list should be ok
#safe_characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456 789.-_: /" #safe_characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456 789.-_: /"
####################################################################### #######################################################################
# Query config: Username # Query config: Username
####################################################################### #######################################################################
# This is the username that will get substituted, escaped, and added # This is the username that will get substituted, escaped, and added
skipping to change at line 49 skipping to change at line 49
#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 = "DATEADD(SS, ${event_timestamp_epoch}, '19700101')" event_timestamp = "DATEADD(SS, ${event_timestamp_epoch}, '19700101')"
####################################################################### #######################################################################
# 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}'"
}
#######################################################################
# Authorization Queries # Authorization Queries
####################################################################### #######################################################################
# These queries compare the check items for the user # These queries compare the check items for the user
# in ${authcheck_table} and setup the reply items in # in ${authcheck_table} and setup the reply items in
# ${authreply_table}. You can use any query/tables # ${authreply_table}. You can use any query/tables
# you want, but the return data for each row MUST # you want, but the return data for each row MUST
# be in the following order: # be in the following order:
# #
# 0. Row ID (currently unused) # 0. Row ID (currently unused)
# 1. UserName/GroupName # 1. UserName/GroupName
skipping to change at line 177 skipping to change at line 211
AcctOutputOctets, \ AcctOutputOctets, \
CalledStationId, \ CalledStationId, \
CallingStationId, \ CallingStationId, \
AcctTerminateCause, \ AcctTerminateCause, \
ServiceType, \ ServiceType, \
FramedProtocol, \ FramedProtocol, \
FramedIPAddress, \ FramedIPAddress, \
FramedIPv6Address, \ FramedIPv6Address, \
FramedIPv6Prefix, \ FramedIPv6Prefix, \
FramedInterfaceId, \ FramedInterfaceId, \
DelegatedIPv6Prefix) \ DelegatedIPv6Prefix \
${..class.column_name}) \
VALUES(\ VALUES(\
'%{Acct-Session-Id}', \ '%{Acct-Session-Id}', \
'%{Acct-Unique-Session-Id}', \ '%{Acct-Unique-Session-Id}', \
'%{SQL-User-Name}', \ '%{SQL-User-Name}', \
'%{Realm}', \ '%{Realm}', \
'%{%{NAS-IPv6-Address}:-%{NAS-IP-Address}}', \ '%{%{NAS-IPv6-Address}:-%{NAS-IP-Address}}', \
'%{%{NAS-Port-ID}:-%{NAS-Port}}', \ '%{%{NAS-Port-ID}:-%{NAS-Port}}', \
'%{NAS-Port-Type}', \ '%{NAS-Port-Type}', \
'%S', \ '%S', \
0, \ 0, \
skipping to change at line 202 skipping to change at line 237
0, \ 0, \
'%{Called-Station-Id}', \ '%{Called-Station-Id}', \
'%{Calling-Station-Id}', \ '%{Calling-Station-Id}', \
'', \ '', \
'%{Service-Type}', \ '%{Service-Type}', \
'', \ '', \
'', \ '', \
'', \ '', \
'', \ '', \
'', \ '', \
'')" '' \
${....class.packet_xlat})"
query = "\ query = "\
UPDATE ${....acct_table1} SET \ UPDATE ${....acct_table1} SET \
AcctStartTime = '%S', \ AcctStartTime = '%S', \
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}}' \
AND NASPortType = '%{NAS-Port-Type}' \ AND NASPortType = '%{NAS-Port-Type}' \
skipping to change at line 245 skipping to change at line 281
AcctTerminateCause, \ AcctTerminateCause, \
ServiceType, \ ServiceType, \
FramedProtocol, \ FramedProtocol, \
FramedIPAddress, \ FramedIPAddress, \
FramedIPv6Address, \ FramedIPv6Address, \
FramedIPv6Prefix, \ FramedIPv6Prefix, \
FramedInterfaceId, \ FramedInterfaceId, \
DelegatedIPv6Prefix, \ DelegatedIPv6Prefix, \
AcctStartDelay, \ AcctStartDelay, \
AcctStopDelay, \ AcctStopDelay, \
XAscendSessionSvrKey) \ XAscendSessionSvrKey \
${..class.column_name}) \
VALUES(\ VALUES(\
'%{Acct-Session-Id}', \ '%{Acct-Session-Id}', \
'%{Acct-Unique-Session-Id}', \ '%{Acct-Unique-Session-Id}', \
'%{SQL-User-Name}', \ '%{SQL-User-Name}', \
'%{Realm}', \ '%{Realm}', \
'%{NAS-IP-Address}', \ '%{NAS-IP-Address}', \
'%{%{NAS-Port-ID}:-%{NAS-Port}}', \ '%{%{NAS-Port-ID}:-%{NAS-Port}}', \
'%{NAS-Port-Type}', \ '%{NAS-Port-Type}', \
${....event_timestamp}, \ ${....event_timestamp}, \
'0', \ '0', \
skipping to change at line 273 skipping to change at line 310
'', \ '', \
'%{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}', \
'%{Acct-Delay-Time}', \ '%{Acct-Delay-Time}', \
'0', \ '0', \
'%{X-Ascend-Session-Svr-Key}')" '%{X-Ascend-Session-Svr-Key}' \
${....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 351 skipping to change at line 389
CalledStationId, \ CalledStationId, \
CallingStationId, \ CallingStationId, \
ServiceType, \ ServiceType, \
FramedProtocol, \ FramedProtocol, \
FramedIPAddress, \ FramedIPAddress, \
FramedIPv6Address, \ FramedIPv6Address, \
FramedIPv6Prefix, \ FramedIPv6Prefix, \
FramedInterfaceId, \ FramedInterfaceId, \
DelegatedIPv6Prefix, \ DelegatedIPv6Prefix, \
AcctStartDelay, \ AcctStartDelay, \
XAscendSessionSvrKey) \ XAscendSessionSvrKey \
${..class.column_name}) \
VALUES(\ VALUES(\
'%{Acct-Session-Id}', \ '%{Acct-Session-Id}', \
'%{Acct-Unique-Session-Id}', \ '%{Acct-Unique-Session-Id}', \
'%{SQL-User-Name}', \ '%{SQL-User-Name}', \
'%{Realm}', \ '%{Realm}', \
'%{NAS-IP-Address}', \ '%{NAS-IP-Address}', \
'%{%{NAS-Port-ID}:-%{NAS-Port}}', \ '%{%{NAS-Port-ID}:-%{NAS-Port}}', \
'%{NAS-Port-Type}', \ '%{NAS-Port-Type}', \
'%{Acct-Session-Time}', \ '%{Acct-Session-Time}', \
'%{Acct-Authentic}', \ '%{Acct-Authentic}', \
skipping to change at line 375 skipping to change at line 414
'%{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}', \
'0', \ '0', \
'%{X-Ascend-Session-Svr-Key}')" '%{X-Ascend-Session-Svr-Key}' \
${....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 450 skipping to change at line 490
CallingStationId, \ CallingStationId, \
AcctTerminateCause, \ AcctTerminateCause, \
ServiceType, \ ServiceType, \
FramedProtocol, \ FramedProtocol, \
FramedIPAddress, \ FramedIPAddress, \
FramedIPv6Address, \ FramedIPv6Address, \
FramedIPv6Prefix, \ FramedIPv6Prefix, \
FramedInterfaceId, \ FramedInterfaceId, \
DelegatedIPv6Prefix, \ DelegatedIPv6Prefix, \
AcctStartDelay, \ AcctStartDelay, \
AcctStopDelay) \ AcctStopDelay \
${..class.column_name}) \
VALUES(\ VALUES(\
'%{Acct-Session-Id}', \ '%{Acct-Session-Id}', \
'%{Acct-Unique-Session-Id}', \ '%{Acct-Unique-Session-Id}', \
'%{SQL-User-Name}', \ '%{SQL-User-Name}', \
'%{Realm}', \ '%{Realm}', \
'%{NAS-IP-Address}', \ '%{NAS-IP-Address}', \
'%{%{NAS-Port-ID}:-%{NAS-Port}}', \ '%{%{NAS-Port-ID}:-%{NAS-Port}}', \
'%{NAS-Port-Type}', \ '%{NAS-Port-Type}', \
${....event_timestamp}, \ ${....event_timestamp}, \
'%{Acct-Session-Time}', \ '%{Acct-Session-Time}', \
skipping to change at line 478 skipping to change at line 519
'%{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}', \
'0', \ '0', \
'%{%{Acct-Delay-Time}:-0}')" '%{%{Acct-Delay-Time}:-0}' \
${....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 532 skipping to change at line 574
} }
} }
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(\
'%{User-Name}', \ '%{User-Name}', \
'%{%{User-Password}:-CHAP-PASSWORD}', \ '%{%{User-Password}:-CHAP-PASSWORD}', \
'%{reply:Packet-Type}', \ '%{reply:Packet-Type}', \
'%S.%{expr:%M / 1000}')" '%S.%{expr:%M / 1000}' \
${..class.reply_xlat})"
} }
 End of changes. 12 change blocks. 
11 lines changed or deleted 54 lines changed or added

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