Bug : firewall non modifi lors des modifs des machines du crans
darcs-hash:20050103205236-41617-4ee33faa2174145c5e682da5f1e53955b25e2153.gz
This commit is contained in:
parent
2e32037a0e
commit
b2dd08200b
1 changed files with 8 additions and 3 deletions
|
@ -22,7 +22,7 @@ sys.path.append('/usr/scripts/gestion')
|
|||
|
||||
import syslog
|
||||
from lock import *
|
||||
from ldap_crans import crans_ldap, ann_scol, machine
|
||||
from ldap_crans import crans_ldap, ann_scol, machine, crans
|
||||
from affich_tools import *
|
||||
from commands import getstatusoutput
|
||||
from iptools import AddrInNet
|
||||
|
@ -474,7 +474,7 @@ class firewall_komaz :
|
|||
mac_ip_maj = {}
|
||||
serveur_maj = False
|
||||
for ip in ip_list :
|
||||
machine = crans_ldap().search('paiement=ok&ip=%s'% ip)['machine']
|
||||
machine = crans_ldap().search('ip=%s'% ip)['machine']
|
||||
if not machine :
|
||||
# Destruction des occurences
|
||||
if AddrInNet(ip,self.zone_serveur) :
|
||||
|
@ -487,7 +487,12 @@ class firewall_komaz :
|
|||
if AddrInNet(ip,self.zone_serveur) :
|
||||
serveur_maj = True
|
||||
else :
|
||||
mac_ip_maj[ip] = machine[0]
|
||||
# Il faut avoir payé ou être une machine du crans
|
||||
if crans_ldap().search('paiement=ok&ip=%s'% ip)['machine'] or \
|
||||
machine[0].proprietaire().__class__ == crans :
|
||||
mac_ip_maj[ip] = machine[0]
|
||||
else :
|
||||
mac_ip_maj[ip] = None
|
||||
else :
|
||||
print WARNING
|
||||
if debug :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue