From b47b1174d4cde2ed92f79e64e99b3d28c3170ff4 Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Fri, 28 Feb 2014 19:38:34 +0100 Subject: [PATCH] radius_auth: ancien CROUS sur vlan 10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ceci est une solution temporaire en attendant qu'ils viennent adhérer. --- utils/radius_auth.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/radius_auth.py b/utils/radius_auth.py index 4e636e18..885e8bcc 100755 --- a/utils/radius_auth.py +++ b/utils/radius_auth.py @@ -51,6 +51,12 @@ def do_auth(mac, prise): conn = crans_ldap(readonly=True) m = conn.search('mac=%s' % mac)['machine'] 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") elif len(m) > 1: return (-1, "Pb recherche mac (nb résultat %d!=1)" % len(m), "")