From d215f0174adb3a65d09cfd337d30952bd63728a6 Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Thu, 11 Oct 2012 18:52:49 +0200 Subject: [PATCH] [whos] on ne retrieve plus les infos en ssh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ignore-this: 2c211569e86513ad8d9674db239e9ef5 Il faut interfacer ça avec le binding pour les bornes mais il utilise le nouveau binding ldap, et je n'ai pas envie de créer deux connexions ldap :/ darcs-hash:20121011165249-28565-bdce44f957c26552a844db47856e2dcb7cb9d4e6.gz --- gestion/whos.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/gestion/whos.py b/gestion/whos.py index 97a15eaf..8aa7fc6d 100644 --- a/gestion/whos.py +++ b/gestion/whos.py @@ -574,16 +574,7 @@ def adher_details(adher) : clients_ipsec = None def ipsec_ok(machine) : """Indique si une machine est correctement authentifiée""" - prefix="" - if hostname != "ragnarok": - if not os.path.isfile("/usr/scripts/gestion/clef-encap"): - return None - prefix = "ssh -i /usr/scripts/gestion/clef-encap root@ragnarok.crans.org " - clients = globals()['clients_ipsec'] - if clients == None: - clients = [x.split("/")[0] for x in commands.getoutput("%snetstat -r -f encap | awk '($2 == \"0\") {print $6}'" % prefix).split("\n")] - globals()['clients_ipsec'] = clients - return machine.nom() in clients + return False def machine_details(machine) : """ @@ -938,6 +929,7 @@ def borne_clients_canal(borne) : """ macs = [] canal = -1 + return {"canal": canal, "mac-rssi": macs} # Suite à réimplémenter # Uniquement possible pour les admins et si on a la clef for clef in ["/etc/wifi/ssh/wifi","/usr/scripts/gestion/clef-wifi"]: if os.path.isfile(clef) and user_tests.isadm():