def authorize(p): radiusd.log(radiusd.L_DBG, 'Python - shared_attribute=' + str(hasattr(shared, 'shared_attribute'))) if not hasattr(shared, 'shared_attribute'): setattr(shared, 'shared_attribute', True) return radiusd.RLM_MODULE_NOOP else: return radiusd.RLM_MODULE_OK
def authorize(p): global local radiusd.log(radiusd.L_DBG, 'Python - threading.local.tls()=' + str(hasattr(local, 'tls'))) if hasattr(local, 'tls'): return radiusd.RLM_MODULE_OK else: local.tls = True return radiusd.RLM_MODULE_NOOP
def authorize(p): print("*** authorize ***") print("") radiusd.log(radiusd.L_INFO, '*** log call in authorize ***') print("") print(p) print("") print(radiusd.config) print("") return radiusd.RLM_MODULE_OK
def accounting(p): print("*** accounting ***") radiusd.log(radiusd.L_INFO, '*** log call in accounting (0) ***') print("") print(p) return radiusd.RLM_MODULE_OK