~ubuntu-branches/ubuntu/hardy/freeradius/hardy-proposed

« back to all changes in this revision

Viewing changes to raddb/mssql.conf

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2006-12-16 20:45:11 UTC
  • mfrom: (3.1.10 feisty)
  • Revision ID: james.westby@ubuntu.com-20061216204511-3pbbsu4s8jtehsor
Tags: 1.1.3-3
Fix POSIX compliance problem in init script.  Closes: #403384. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
#
4
4
#  The database schema is available at:
5
5
#
6
 
#   src/radiusd/src/modules/rlm_sql/drivers/rlm_sql_freetds/db_mssql.sql
 
6
#       doc/examples/mssql.sql
7
7
#
8
 
#       $Id: mssql.conf,v 1.6 2004/03/25 11:31:17 phampson Exp $
 
8
#  $Id: mssql.conf,v 1.6.4.1 2006/02/04 14:53:44 nbk Exp $
9
9
#
10
10
sql {
11
11
 
12
12
        # Database type
13
13
        # Current supported are: rlm_sql_mysql, rlm_sql_postgresql,
14
 
        # rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds
15
 
        driver = "rlm_sql_freetds"
 
14
        # rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc
 
15
        driver = "rlm_sql_unixodbc"
16
16
 
17
17
        # Connect info
18
18
        server = "localhost"
19
19
        login = "root"
20
20
        password = "rootpass"
21
 
        
 
21
 
22
22
        # Database table configuration
23
23
        radius_db = "radius"
24
 
                
 
24
 
25
25
        # If you want both stop and start records logged to the
26
26
        # same SQL table, leave this as is.  If you want them in
27
27
        # different tables, put the start table in acct_table1
28
28
        # and stop table in acct_table2
29
29
        acct_table1 = "radacct"
30
30
        acct_table2 = "radacct"
31
 
                
 
31
 
32
32
        authcheck_table = "radcheck"
33
33
        authreply_table = "radreply"
34
 
        
 
34
 
35
35
        groupcheck_table = "radgroupcheck"
36
36
        groupreply_table = "radgroupreply"
37
 
        
 
37
 
38
38
        usergroup_table = "usergroup"
39
 
        
 
39
 
40
40
        # Remove stale session if checkrad does not see a double login
41
41
        deletestalesessions = yes
42
42
 
47
47
        # number of sql connections to make to server
48
48
        num_sql_socks = 5
49
49
 
 
50
        # Safe characters list for sql queries. Everything else is replaced
 
51
        # with their mime-encoded equivalents.
 
52
        # The default list should be ok
 
53
        #safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"
 
54
 
50
55
        #######################################################################
51
56
        #  Query config:  Username
52
57
        #######################################################################
53
 
        # This is the username that will get substituted, escaped, and added 
54
 
        # as attribute 'SQL-User-Name'.  '%{SQL-User-Name}' should be used below 
55
 
        # everywhere a username substitution is needed so you you can be sure 
56
 
        # the username passed from the client is escaped properly.  
 
58
        # This is the username that will get substituted, escaped, and added
 
59
        # as attribute 'SQL-User-Name'.  '%{SQL-User-Name}' should be used
 
60
        # below everywhere a username substitution is needed so you you can
 
61
        # be sure the username passed from the client is escaped properly.
57
62
        #
58
 
        #  Uncomment the next line, if you want the sql_user_name to mean:
 
63
        # Uncomment the next line, if you want the sql_user_name to mean:
59
64
        #
60
65
        #    Use Stripped-User-Name, if it's there.
61
66
        #    Else use User-Name, if it's there,
69
74
        #  Authorization Queries
70
75
        #######################################################################
71
76
        #  These queries compare the check items for the user
72
 
        #  in ${authcheck_table} and setup the reply items in 
 
77
        #  in ${authcheck_table} and setup the reply items in
73
78
        #  ${authreply_table}.  You can use any query/tables
74
 
        #  you want, but the return data for each row MUST 
 
79
        #  you want, but the return data for each row MUST
75
80
        #  be in the  following order:
76
81
        #
77
82
        #  0. Row ID (currently unused)
91
96
 
92
97
 
93
98
        #######################################################################
94
 
        #  Authentication Query
95
 
        #######################################################################
96
 
        # This query is used only to get the password for the
97
 
        # user we want to authenticate.  The password MUST
98
 
        # be the first field in the return row data.
99
 
        # The 'Password' attribute is deprecated in favor of 'User-Password'.
100
 
        #######################################################################
101
 
 
102
 
        authenticate_query = "SELECT Value,Attribute FROM ${authcheck_table} WHERE UserName = '%{User-Name}' AND ( Attribute = 'User-Password' OR Attribute = 'Password' OR Attribute = 'Crypt-Password' ) ORDER BY Attribute DESC"
103
 
 
104
 
        #######################################################################
105
99
        #  Accounting Queries
106
100
        #######################################################################
107
 
        # accounting_onoff_query        - query for Accounting On/Off packets 
108
 
        # accounting_update_query       - query for Accounting update packets 
109
 
        # accounting_update_query_alt   - query for Accounting update packets 
110
 
        #                               (alternate in case first query fails)
111
 
        # accounting_start_query        - query for Accounting start packets 
112
 
        # accounting_start_query_alt    - query for Accounting start packets 
113
 
        #                               (alternate in case first query fails)
114
 
        # accounting_stop_query         - query for Accounting stop packets 
115
 
        # accounting_stop_query_alt     - query for Accounting start packets 
 
101
        # accounting_onoff_query        - query for Accounting On/Off packets
 
102
        # accounting_update_query       - query for Accounting update packets
 
103
        # accounting_update_query_alt   - query for Accounting update packets
 
104
        #                               (alternate in case first query fails)
 
105
        # accounting_start_query        - query for Accounting start packets
 
106
        # accounting_start_query_alt    - query for Accounting start packets
 
107
        #                               (alternate in case first query fails)
 
108
        # accounting_stop_query         - query for Accounting stop packets
 
109
        # accounting_stop_query_alt     - query for Accounting start packets
116
110
        #                               (alternate in case first query doesn't
117
111
        #                                affect any existing rows in the table)
118
112
        #######################################################################
122
116
 
123
117
        accounting_update_query_alt = "INSERT into ${acct_table1} (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPort, NASPortType, AcctSessionTime, AcctAuthentic, ConnectInfo_start, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port-Id}', '%{NAS-Port-Type}', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0')"
124
118
 
125
 
        # accounting_start_query: Inserting of RadAcctId and AcctStopTime was 
 
119
        # accounting_start_query: Inserting of RadAcctId and AcctStopTime was
126
120
        # removed. These fields are processing by a database
127
121
        accounting_start_query = "INSERT into ${acct_table1} (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPort, NASPortType, AcctStartTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port-Id}', '%{NAS-Port-Type}', '%S', '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{Acct-Delay-Time}', '0')"
128
122