# Table to keep radius client info
client_table = "nas"
+ #
+ # The group attribute specific to this instance of rlm_sql
+ #
+
+ # This entry should be used for additional instances (sql foo {})
+ # of the SQL module.
+# group_attr = "${.:instance}-SQL-Group"
+
+ # This entry should be used for the default instance (sql {})
+ # of the SQL module.
+ group_attr = "SQL-Group"
+
# Read database-specific queries
$INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf
}
SELECT id, groupname, attribute, \
Value, op \
FROM ${groupcheck_table} \
- WHERE groupname = '%{Sql-Group}' \
+ WHERE groupname = '%{${group_attr}}' \
ORDER BY id"
authorize_group_reply_query = "\
SELECT id, groupname, attribute, \
value, op \
FROM ${groupreply_table} \
- WHERE groupname = '%{Sql-Group}' \
+ WHERE groupname = '%{${group_attr}}' \
ORDER BY id"
#######################################################################
authorize_group_check_query = "\
SELECT id, GroupName, Attribute, Value, op \
FROM ${groupcheck_table} \
- WHERE GroupName = '%{Sql-Group}' \
+ WHERE GroupName = '%{${group_attr}}' \
ORDER BY id"
authorize_group_reply_query = "\
SELECT id, GroupName, Attribute, Value, op \
FROM ${groupreply_table} \
- WHERE GroupName = '%{Sql-Group}' \
+ WHERE GroupName = '%{${group_attr}}' \
ORDER BY id"
#######################################################################
SELECT id, groupname, attribute, \
Value, op \
FROM ${groupcheck_table} \
- WHERE groupname = '%{Sql-Group}' \
+ WHERE groupname = '%{${group_attr}}' \
ORDER BY id"
authorize_group_reply_query = "\
SELECT id, groupname, attribute, \
value, op \
FROM ${groupreply_table} \
- WHERE groupname = '%{Sql-Group}' \
+ WHERE groupname = '%{${group_attr}}' \
ORDER BY id"
#######################################################################
SELECT radacctid, acctsessionid, username, nasipaddress, nasportid, framedipaddress, \
callingstationid, framedprotocol \
FROM ${acct_table1} \
- WHERE username = '%{SQL-User-Name}' \
+ WHERE username = '%{${group_attr}}' \
AND acctstoptime IS NULL"
#######################################################################
# Table to keep radius client info
client_table = "nas"
+ # The group attribute specific to this instance of rlm_sql
+ group_attr = "SQL-Group"
+
# Read database-specific queries
$INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf
}
# Table to keep radius client info
client_table = "nas"
+ # The group attribute specific to this instance of rlm_sql
+ group_attr = "SQL-Group"
+
# Read database-specific queries
$INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf
}
# Table to keep radius client info
client_table = "nas"
+ # The group attribute specific to this instance of rlm_sql
+ group_attr = "SQL-Group"
+
# Read database-specific queries
$INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf
}