From b486f33989b6fa5fd31509219f0c1e55a2dc7db3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 11:49:47 +0200 Subject: Adding debian version 3.2.1+dfsg-4+deb12u1. Signed-off-by: Daniel Baumann --- .../rlm_python3-data/ubuntu_example.py.mods-config | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 debian/tests/rlm_python3-data/ubuntu_example.py.mods-config (limited to 'debian/tests/rlm_python3-data/ubuntu_example.py.mods-config') diff --git a/debian/tests/rlm_python3-data/ubuntu_example.py.mods-config b/debian/tests/rlm_python3-data/ubuntu_example.py.mods-config new file mode 100644 index 0000000..5b6330f --- /dev/null +++ b/debian/tests/rlm_python3-data/ubuntu_example.py.mods-config @@ -0,0 +1,26 @@ +#! /usr/bin/env python3 + +import radiusd + +def instantiate(p): + radiusd.radlog(radiusd.L_INFO, '*** example.py instantiate ***') + return radiusd.RLM_MODULE_OK + +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": + msg = "Hello ubuntu!" + status = radiusd.RLM_MODULE_OK + reply = ( ('Reply-Message', msg), ) + return (radiusd.RLM_MODULE_OK, reply, config) + else: + msg = "You are not ubuntu!" + reply = ( ('Reply-Message', msg), ) + status = radiusd.RLM_MODULE_REJECT + return (status, reply, config) + +def detach(p): + radiusd.radlog(radiusd.L_INFO, "*** example.py detach ***") + return radiusd.RLM_MODULE_OK -- cgit v1.2.3