Gestion des blacklistes qui peuvent n'tre que pour :
- un adhrent, cas de upload, p2p - une machine, cas de virus - n'importe, cas de ... on laisse le cas gnral pour viter de tout casser darcs-hash:20060306195158-72cb0-4a7c0fff29965ca409f28203affb73ce018bfe38.gz
This commit is contained in:
parent
6dbaa724d5
commit
0e56dd4c3c
2 changed files with 21 additions and 13 deletions
|
@ -24,10 +24,18 @@ class squid(gen_config) :
|
|||
fic = self._open_conf(self.FICHIER)
|
||||
# recherche_bl :
|
||||
# 1 : search sur champ blacklist et clubs compris
|
||||
# 2 : search sur champ ablacklist et clubs compris
|
||||
# 3 : search sur champ mblacklist et clubs compris
|
||||
# 0 : search plus général et clubs exclus
|
||||
if self.recherche_bl==1:
|
||||
liste = self.db.search("paiement=ok&blacklist=*%s*"%self.chaine)
|
||||
l_proprio = liste["adherent"]+liste["club"]
|
||||
elif self.recherche_bl==2:
|
||||
liste = self.db.search("paiement=ok&ablacklist=*%s*"%self.chaine)
|
||||
l_proprio = liste["adherent"]+liste["club"]
|
||||
elif self.recherche_bl==3:
|
||||
liste = self.db.search("paiement=ok&mblacklist=*%s*"%self.chaine)
|
||||
l_proprio = liste["adherent"]+liste["club"]
|
||||
else:
|
||||
l_proprio = self.db.search('paiement=ok&' + self.chaine)["adherent"]
|
||||
self.anim.iter=len(l_proprio)
|
||||
|
@ -49,21 +57,21 @@ class squid_upload(squid) :
|
|||
|
||||
class squid_virus(squid) :
|
||||
""" Genère le fichier blacklist-virus pour squid """
|
||||
FICHIER = "/etc/squid/blacklist_infectes"
|
||||
FICHIER = "/etc/squid/blacklist_virus"
|
||||
chaine = "virus"
|
||||
recherche_bl = 1
|
||||
recherche_bl = 3
|
||||
|
||||
class squid_warez(squid) :
|
||||
""" Genère le fichier blacklist-warez pour squid """
|
||||
FICHIER = "/etc/squid/blacklist_warez"
|
||||
chaine = "warez"
|
||||
recherche_bl = 1
|
||||
recherche_bl = 2
|
||||
|
||||
class squid_p2p(squid) :
|
||||
""" Genère le fichier blacklist-p2p pour squid """
|
||||
FICHIER = "/etc/squid/blacklist_p2p"
|
||||
chaine = "P2P"
|
||||
recherche_bl = 1
|
||||
chaine = "p2p"
|
||||
recherche_bl = 2
|
||||
|
||||
class squid_carte(squid) :
|
||||
""" Genère le fichier blacklist-carte pour squid """
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue