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