From 50b37d4a27d3295a29afca2286f1a5a086142cec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 11:49:46 +0200 Subject: Adding upstream version 3.2.1+dfsg. Signed-off-by: Daniel Baumann --- src/modules/rlm_python3/radiusd.py | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/modules/rlm_python3/radiusd.py (limited to 'src/modules/rlm_python3/radiusd.py') diff --git a/src/modules/rlm_python3/radiusd.py b/src/modules/rlm_python3/radiusd.py new file mode 100644 index 0000000..e9db28a --- /dev/null +++ b/src/modules/rlm_python3/radiusd.py @@ -0,0 +1,43 @@ +#! /usr/bin/env python3 +# +# Definitions for RADIUS programs +# +# Copyright 2002 Miguel A.L. Paraz +# +# This should only be used when testing modules. +# Inside freeradius, the 'radiusd' Python module is created by the C module +# and the definitions are automatically created. +# +# $Id$ + +# from modules.h + +RLM_MODULE_REJECT = 0 +RLM_MODULE_FAIL = 1 +RLM_MODULE_OK = 2 +RLM_MODULE_HANDLED = 3 +RLM_MODULE_INVALID = 4 +RLM_MODULE_USERLOCK = 5 +RLM_MODULE_NOTFOUND = 6 +RLM_MODULE_NOOP = 7 +RLM_MODULE_UPDATED = 8 +RLM_MODULE_NUMCODES = 9 + +# from log.h +L_AUTH = 2 +L_INFO = 3 +L_ERR = 4 +L_WARN = 5 +L_PROXY = 6 +L_ACCT = 7 + +L_DBG = 16 +L_DBG_WARN = 17 +L_DBG_ERR = 18 +L_DBG_WARN_REQ = 19 +L_DBG_ERR_REQ = 20 + +# log function +def radlog(level, msg): + import sys + sys.stdout.write(msg + '\n') -- cgit v1.2.3