radius_auth: ancien CROUS sur vlan 10
Ceci est une solution temporaire en attendant qu'ils viennent adhérer.
This commit is contained in:
parent
4f3c2120e0
commit
b47b1174d4
1 changed files with 6 additions and 0 deletions
|
@ -51,6 +51,12 @@ def do_auth(mac, prise):
|
||||||
conn = crans_ldap(readonly=True)
|
conn = crans_ldap(readonly=True)
|
||||||
m = conn.search('mac=%s' % mac)['machine']
|
m = conn.search('mac=%s' % mac)['machine']
|
||||||
if len(m) == 0:
|
if len(m) == 0:
|
||||||
|
# Est-ce un ancien client de l'offre Crous ?
|
||||||
|
# on le met sur le vlan install-party où on aura activé un forwarding
|
||||||
|
# (uniquement en attendant qu'il soit inscrit proprement)
|
||||||
|
for chbre in annuaires_pg.reverse(prise[0], prise[1:]):
|
||||||
|
if not annuaires_pg.is_crans(prise[0], chbre):
|
||||||
|
return (0, "TMP: ancien client CROUS", 'event')
|
||||||
return (0, "Mac inconnue", "accueil")
|
return (0, "Mac inconnue", "accueil")
|
||||||
elif len(m) > 1:
|
elif len(m) > 1:
|
||||||
return (-1, "Pb recherche mac (nb résultat %d!=1)" % len(m), "")
|
return (-1, "Pb recherche mac (nb résultat %d!=1)" % len(m), "")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue