auth.py: trompé d'1bit
This commit is contained in:
parent
ec603f1202
commit
ae83dac934
1 changed files with 3 additions and 2 deletions
|
@ -339,7 +339,7 @@ def authorize_nas(data, ldap):
|
|||
# EUI64, hein ?
|
||||
assert ((addr >> 24) & 0xffff) == 0xfffe
|
||||
# Extrait la mac de l'EUI64 (« trust me, it works »)
|
||||
mac = (addr >> 16) & (0xffffff << 24) ^ (addr & 0xffffff) ^ (1 << 42)
|
||||
mac = (addr >> 16) & (0xffffff << 24) ^ (addr & 0xffffff) ^ (1 << 41)
|
||||
|
||||
mac = lc_ldap.crans_utils.format_mac("%012x" % mac)
|
||||
m_filter = u'(macAddress=%s)' % mac
|
||||
|
@ -354,8 +354,9 @@ def authorize_nas(data, ldap):
|
|||
shortname = "wifi"
|
||||
vserver = 'inner-tunnel'
|
||||
else:
|
||||
logger.info('not found %r' % m_filter)
|
||||
return radiusd.RLM_MODULE_NOTFOUND
|
||||
elif unicode(machines[0]['host'][0]).startswith('bat'):
|
||||
elif unicode(machines[0]['host'][0]).startswith(u'bat'):
|
||||
password = radius_password('radius_key', machines[0])
|
||||
shortname = 'switchs'
|
||||
vserver = 'filaire'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue