Project

General

Profile

Anomalie #4384

problèmes inclusions statiques

Added by Karim Ayari almost 11 years ago. Updated over 10 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Gwenael Remond
Category:
-
Start date:
11/06/2012
Due date:
% Done:

100%

Spent time:
Distribution:
EOLE 2.3

Description

lorsqu'on ne fait pas de retour chariot à la fin des inclusions statiques, exemple :

sans le retour chariot à la fin des incl. statiques :

%end if</include>

ona une erreur :

* Starting firewall: bastion (modèle "4zones-2-3_2")probleme au chargement du modele xml:/tmp/tmp.iTBmlWIliY
mismatched tag: line 865, column 2

avec retour chariot :

%end if
</include>

et là aucune erreur.


il y aussi un problème avec le caractère & si on veut par exemple lancer un script perso au moment du lance.firewall (toujours dans les inclusions statiques)

test -x /root/iptables-acad.sh && /root/iptables-acad.sh

renvoie tout un tas d'erreur python.

xml.parsers.expat.ExpatError: not well-formed (invalid token): line 12, column 32
probleme au chargement du modele xml:/usr/share/era/modeles/4zones-2-3_2.xml
not well-formed (invalid token): line 12, column 32
!! Erreur lors de la generation des regles iptables par era !! non appliquées !

par contre

test ! -x /root/iptables-acad.sh || /root/iptables-acad.sh
fonctionne parfaitement

Associated revisions

Revision 974c3cdb (diff)
Added by Gwenael Remond about 11 years ago

escape chars in static rules fixes #4384

Revision e6145384 (diff)
Added by Gwenael Remond almost 11 years ago

escape chars in static rules (pb in tests) fixes #4384

History

#1 Updated by Gwenael Remond almost 11 years ago

  • Status changed from Nouveau to Résolu
  • % Done changed from 0 to 100

#2 Updated by Joël Cuissinat almost 11 years ago

  • Project changed from Amon to ERA
  • Target version set to Mises à jour 2.3.7 RC

#3 Updated by Joël Cuissinat almost 11 years ago

  • Status changed from Résolu to À valider
  • % Done changed from 100 to 90

Il manque le fichier de test : /usr/share/era/tests/data/includes.xml

#4 Updated by Gwenael Remond almost 11 years ago

  • Status changed from À valider to Résolu
  • % Done changed from 90 to 100

#5 Updated by Joël Cuissinat almost 11 years ago

  • Status changed from Résolu to Fermé

Avec 2.3-eole31~13.gbpa1e031 tous les tests unitaires passent et notamment : test_hlcompiler.py

#6 Updated by Christophe Dezé over 10 years ago

dpkg -s era
Package: era
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 2064
Maintainer: Equipe Eole <>
Architecture: all
Version: 2.3-eole35
Replaces: eole-firewall
Depends: python
Conflicts: eole-firewall

si
<include>%include "/sbin/fw_nantes_commun" </include>


root@pf-amon:~# /usr/share/creole/creolecat.py -o /tmp/tmp.1uCMJeafH4 -i /etc/eole/config.eol /usr/share/era/modeles/5zonesnantes.xml
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/Cheetah/Template.py", line 771, in compile
source, file, generatedModuleCode, exception=e)
File "/usr/lib/pymodules/python2.6/Cheetah/Template.py", line 1851, in genParserErrorFromPythonException
reader = SourceReader(source, filename=filename)
File "/usr/lib/pymodules/python2.6/Cheetah/SourceReader.py", line 56, in __init__
self._srcLen = len(src)
TypeError: object of type 'NoneType' has no len()
Erreur lors de l'instanciation du template /usr/share/era/modeles/5zonesnantes.xml : invalid syntax (_usr_share_era_modeles_5zonesnantes_xml.py, line 92)

si
<include>%include "/sbin/fw_nantes_commun"
</include>

pas de soucis

Also available in: Atom PDF