[config,firewall_new,ipt,ldap_crans] bl_carte_et_definitif = True, sursis d'une semaine même avec bl_carte_et_definitif
Ignore-this: aef64ec3880b96beda0ec95c7c6c255c darcs-hash:20121119160943-3a55a-309f4e1bf82cc4ef955c7a7a723220704e74ba18.gz
This commit is contained in:
parent
11f461576b
commit
b92229f0f1
4 changed files with 63 additions and 21 deletions
|
@ -37,7 +37,7 @@ from ldap_crans import AssociationCrans, Machine, MachineWifi, BorneWifi
|
|||
from affich_tools import *
|
||||
from commands import getstatusoutput
|
||||
from iptools import AddrInNet, NetSubnets, IpSubnet
|
||||
from config import NETs, mac_komaz, mac_wifi, mac_titanic, mac_g, conf_fw, p2p, vlans, debit_max_radin, adm_users, accueil_route, blacklist_sanctions, blacklist_sanctions_soft
|
||||
from config import NETs, mac_komaz, mac_wifi, mac_titanic, mac_g, conf_fw, p2p, vlans, debit_max_radin, adm_users, accueil_route, blacklist_sanctions, blacklist_sanctions_soft, periode_transitoire
|
||||
from ipset import IpsetError, Ipset
|
||||
from lc_ldap import lc_ldap
|
||||
syslog.openlog('firewall')
|
||||
|
@ -1088,7 +1088,12 @@ class firewall_komaz(firewall_crans) :
|
|||
|
||||
|
||||
# Recherche sur le champ paiement seulement (clubs compris) et plus ablacklist pour capturer aussi les deconnection pour chambre invalide et carte étudiant
|
||||
search = db.search('paiement=ok')
|
||||
search = db.search('paiement=%s' % ann_scol)
|
||||
if periode_transitoire:
|
||||
tmp=db.search('paiement=%s' % ann_scol-1)
|
||||
search['adherent'].entend(tmp['adherent'])
|
||||
search['club'].entend(tmp['club'])
|
||||
del tmp
|
||||
self.anim = anim("\tBlackliste adhérents+clubs", 2*len(search['adherent']+search['club']))
|
||||
for entite in search['adherent'] + search['club']:
|
||||
self.anim.cycle()
|
||||
|
@ -1108,7 +1113,9 @@ class firewall_komaz(firewall_crans) :
|
|||
print OK
|
||||
|
||||
# Recherche sur le champ mblacklist
|
||||
search = db.search('mblacklist=*&paiement=ok')
|
||||
search = db.search('mblacklist=*&paiement=%s' % ann_scol)
|
||||
if periode_transitoire:
|
||||
search['machine'].entend(db.search('mblacklist=*&paiement=%s' % ann_scol-1)['machine'])
|
||||
self.anim = anim("\tBlackliste machines", 2*len(search['machine']))
|
||||
for entite in search['machine']:
|
||||
self.anim.cycle()
|
||||
|
@ -1267,8 +1274,11 @@ class firewall_zamok(firewall_crans) :
|
|||
|
||||
def filter_table(self):
|
||||
self.anim = anim('\tStructure de la table filter')
|
||||
iptables('-t filter -N SERV_OUT_ADM')
|
||||
iptables('-t filter -N TEST_MAC-IP')
|
||||
try:
|
||||
iptables('-t filter -N SERV_OUT_ADM')
|
||||
iptables('-t filter -N TEST_MAC-IP')
|
||||
except:
|
||||
pass
|
||||
iptables("-t filter -A OUTPUT -d 224.0.0.0/4 -j DROP")
|
||||
|
||||
# <!> à placer dans filter
|
||||
|
@ -1304,8 +1314,13 @@ class firewall_zamok(firewall_crans) :
|
|||
|
||||
self.filter_table()
|
||||
|
||||
# Recherche sur le champ ablacklist (clubs compris)
|
||||
search = db.search('ablacklist=*&paiement=ok')
|
||||
# Recherche des adherent blacklisté (club compris)
|
||||
search = db.search('paiement=%s' % ann_scol)
|
||||
if periode_transitoire:
|
||||
tmp=db.search('paiement=%s' % ann_scol-1)
|
||||
search['adherent'].entend(tmp['adherent'])
|
||||
search['club'].entend(tmp['club'])
|
||||
del tmp
|
||||
self.anim = anim("\tBlackliste des comptes Crans", len(search['adherent']))
|
||||
for adh in search['adherent']:
|
||||
self.anim.cycle()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue