summaryrefslogtreecommitdiffstats
path: root/raddb/experimental.conf
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--raddb/experimental.conf116
1 files changed, 116 insertions, 0 deletions
diff --git a/raddb/experimental.conf b/raddb/experimental.conf
new file mode 100644
index 0000000..87d9744
--- /dev/null
+++ b/raddb/experimental.conf
@@ -0,0 +1,116 @@
+#
+# This file contains the configuration for experimental modules.
+#
+# By default, it is NOT included in the build.
+#
+# $Id$
+#
+
+# Configuration for the Python module.
+#
+# Where radiusd is a Python module, radiusd.py, and the
+# function 'authorize' is called. Here is a dummy piece
+# of code:
+#
+# def authorize(params):
+# print params
+# return (5, ('Reply-Message', 'banned'))
+#
+# The RADIUS value-pairs are passed as a tuple of tuple
+# pairs as the first argument, e.g. (('attribute1',
+# 'value1'), ('attribute2', 'value2'))
+#
+# The function return is a tuple with the first element
+# being the return value of the function.
+# The 5 corresponds to RLM_MODULE_USERLOCK. I plan to
+# write the return values as Python symbols to avoid
+# confusion.
+#
+# The remaining tuple members are the string form of
+# value-pairs which are passed on to pairmake().
+#
+python {
+ mod_instantiate = radiusd_test
+ func_instantiate = instantiate
+
+ mod_authorize = radiusd_test
+ func_authorize = authorize
+
+ mod_accounting = radiusd_test
+ func_accounting = accounting
+
+ mod_pre_proxy = radiusd_test
+ func_pre_proxy = pre_proxy
+
+ mod_post_proxy = radiusd_test
+ func_post_proxy = post_proxy
+
+ mod_post_auth = radiusd_test
+ func_post_auth = post_auth
+
+ mod_recv_coa = radiusd_test
+ func_recv_coa = recv_coa
+
+ mod_send_coa = radiusd_test
+ func_send_coa = send_coa
+
+ mod_detach = radiusd_test
+ func_detach = detach
+}
+
+
+# Configuration for the example module. Uncommenting it will cause it
+# to get loaded and initialised, but should have no real effect as long
+# it is not referenced in one of the autz/auth/preacct/acct sections
+example {
+ # Boolean variable.
+ # allowed values: {no, yes}
+ boolean = yes
+
+ # An integer, of any value.
+ integer = 16
+
+ # A string.
+ string = "This is an example configuration string"
+
+ # An IP address, either in dotted quad (1.2.3.4) or hostname
+ # (example.com)
+ ipaddr = 127.0.0.1
+
+ # A subsection
+ mysubsection {
+ anotherinteger = 1000
+ # They nest
+ deeply nested {
+ string = "This is a different string"
+ }
+ }
+}
+
+#
+# To create a dbm users file, do:
+#
+# cat test.users | rlm_dbm_parser -f /etc/raddb/users_db
+#
+# Then add 'dbm' in 'authorize' section.
+#
+# Note that even if the file has a ".db" or ".dbm" extension,
+# you may have to specify it here without that extension. This
+# is because the DBM libraries "helpfully" add a ".db" to the
+# filename, but don't check if it's already there.
+#
+dbm {
+ usersfile = ${confdir}/users_db
+}
+
+# Instantiate a couple instances of the idn module
+idn {
+}
+
+# ...more commonly known as...
+idn idna {
+}
+
+idn idna_lenient {
+ UseSTD3ASCIIRules = no
+}