summaryrefslogtreecommitdiffstats
path: root/debian/tests/rlm_python3-data
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:42:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:42:23 +0000
commitbf2d5b842e9f5f2b2be504ac1fa4846f92a3e85f (patch)
treeb2d4ac035384d80e19e3feb6104c49d507fa4fb3 /debian/tests/rlm_python3-data
parentAdding debian version 3.2.5+dfsg-1. (diff)
downloadfreeradius-bf2d5b842e9f5f2b2be504ac1fa4846f92a3e85f.tar.xz
freeradius-bf2d5b842e9f5f2b2be504ac1fa4846f92a3e85f.zip
Adding debian version 3.2.5+dfsg-2.debian/3.2.5+dfsg-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/rlm_python3-data')
-rw-r--r--debian/tests/rlm_python3-data/ubuntu_example.py.mods-config7
1 files changed, 5 insertions, 2 deletions
diff --git a/debian/tests/rlm_python3-data/ubuntu_example.py.mods-config b/debian/tests/rlm_python3-data/ubuntu_example.py.mods-config
index 5b6330f..7788559 100644
--- a/debian/tests/rlm_python3-data/ubuntu_example.py.mods-config
+++ b/debian/tests/rlm_python3-data/ubuntu_example.py.mods-config
@@ -2,6 +2,9 @@
import radiusd
+def get_attribute(p, attribute):
+ return [x[1] for x in p if x[0] == attribute][0]
+
def instantiate(p):
radiusd.radlog(radiusd.L_INFO, '*** example.py instantiate ***')
return radiusd.RLM_MODULE_OK
@@ -9,8 +12,8 @@ def instantiate(p):
def authorize(p):
radiusd.radlog(radiusd.L_INFO, '*** example.py authorize ***')
# whatever password was supplied
- config = ( ('Cleartext-Password', p[1][1]), )
- if p[0][1] == "ubuntu":
+ config = ( ('Cleartext-Password', get_attribute(p, 'User-Password')), )
+ if get_attribute(p, 'User-Name') == "ubuntu":
msg = "Hello ubuntu!"
status = radiusd.RLM_MODULE_OK
reply = ( ('Reply-Message', msg), )