summaryrefslogtreecommitdiffstats
path: root/raddb/mods-available/sql
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:41:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:41:52 +0000
commit44eafeee62e6982131c62df6f74335114ca53024 (patch)
tree1cdf833b0a76e52630d717202398ced5900e11e9 /raddb/mods-available/sql
parentAdding upstream version 3.2.3+dfsg. (diff)
downloadfreeradius-upstream.tar.xz
freeradius-upstream.zip
Adding upstream version 3.2.5+dfsg.upstream/3.2.5+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'raddb/mods-available/sql')
-rw-r--r--raddb/mods-available/sql32
1 files changed, 32 insertions, 0 deletions
diff --git a/raddb/mods-available/sql b/raddb/mods-available/sql
index 0f435ad..68ac4da 100644
--- a/raddb/mods-available/sql
+++ b/raddb/mods-available/sql
@@ -291,6 +291,23 @@ sql {
#
# Setting 'max' to MORE than the number of threads means
# that there are more connections than necessary.
+ #
+ # The setting here should be lower than the maximum
+ # number of connections allowed by the database.
+ #
+ # i.e. There is no point in telling FreeRADIUS to use
+ # 64 connections, while the database is limited to 32
+ # connections. That configuration will cause the
+ # server to be "starved" of connections, and it will
+ # block during normal operations, even when the
+ # database is largely idle.
+ #
+ # At the same time, if the database is slow, there is
+ # no point in increasing "max". More connections
+ # will just cause the database to run more slowly.
+ # The correct fix for a slow database is to fix it, so
+ # that it responds to FreeRADIUS quickly.
+ #
max = ${thread[pool].max_servers}
# Spare connections to be left idle
@@ -371,6 +388,21 @@ sql {
# of the SQL module.
group_attribute = "SQL-Group"
+ # When attributes read from the network are used in SQL queries
+ # their values are escaped to make them safe.
+ # By default FreeRADIUS uses its escaping routine which replaces
+ # unsafe characters with their mime-encoded equivalent.
+ # The list of safe characters is conservative, to allow for differences
+ # between different SQL implementations.
+ #
+ # If you are using the mysql or postgresql drivers, those have their
+ # own escaping functions which only escape characters as required
+ # by those databases.
+ #
+ # Set this option to yes to use the database driver provided escape
+ # function.
+# auto_escape = no
+
# Read database-specific queries
$INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf
}