[whos] on ne retrieve plus les infos en ssh
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
This commit is contained in:
parent
2b8f4b29b1
commit
d215f0174a
1 changed files with 2 additions and 10 deletions
|
@ -574,16 +574,7 @@ def adher_details(adher) :
|
||||||
clients_ipsec = None
|
clients_ipsec = None
|
||||||
def ipsec_ok(machine) :
|
def ipsec_ok(machine) :
|
||||||
"""Indique si une machine est correctement authentifiée"""
|
"""Indique si une machine est correctement authentifiée"""
|
||||||
prefix=""
|
return False
|
||||||
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
|
|
||||||
|
|
||||||
def machine_details(machine) :
|
def machine_details(machine) :
|
||||||
"""
|
"""
|
||||||
|
@ -938,6 +929,7 @@ def borne_clients_canal(borne) :
|
||||||
"""
|
"""
|
||||||
macs = []
|
macs = []
|
||||||
canal = -1
|
canal = -1
|
||||||
|
return {"canal": canal, "mac-rssi": macs} # Suite à réimplémenter
|
||||||
# Uniquement possible pour les admins et si on a la clef
|
# Uniquement possible pour les admins et si on a la clef
|
||||||
for clef in ["/etc/wifi/ssh/wifi","/usr/scripts/gestion/clef-wifi"]:
|
for clef in ["/etc/wifi/ssh/wifi","/usr/scripts/gestion/clef-wifi"]:
|
||||||
if os.path.isfile(clef) and user_tests.isadm():
|
if os.path.isfile(clef) and user_tests.isadm():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue