Esempio n. 1
0
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
Esempio n. 2
0
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
Esempio n. 3
0
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
Esempio n. 4
0
def accounting(p):
    print("*** accounting ***")
    radiusd.log(radiusd.L_INFO, '*** log call in accounting (0) ***')
    print("")
    print(p)
    return radiusd.RLM_MODULE_OK