Last week I was confronted with an L3 from Intel regarding autoyast.
After some investigations I found out it was caused by them using
instead of correct
in partitioning section of autoyast xml code (since they let autoyast
xml code itself been generated by scripts this was not completely
easy to see). Ok, there are many ways to break an autoyast installation
with wrong xml entries but the effects of above bug was quite surprising.
YaST2 scr crashed at end of installation when autoyast writes autoyast
settings with SCR::Write( .target.ycp, ...) into installed system.
At this point in installation SCR has already been restarted below /mnt
and the chrooted SCR gets the ycp code via parsing stdin.
Here the problem really starts:
Above xml leads to followingq map entry: $["fstopt" : `pri=1], but the
YCP parser will not accept this.
This leads to chrooted SCR at end of installation to crash which
of course wreaks furter havoc afterwards.
YCP parser in core/libycp/src/scanner.ll
defines "SYMBOL ([[:alpha:]_][[:alnum:]_]+|[[:alpha:]][[:alnum:]_]*)".
While xml/src/XmlAgent.cc accepts any string:
else if (!xmlStrcmp(confAttr, (const xmlChar *)"symbol"))
YCPSymbol sym((const char *)lastChild->content);
IHMO, we should make that a little more robust. I am not sure if autoyast
is the only part of yast2 where xml code provided by user is parsed into ycp.
Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Tel: +49-911-74053-0, Fax: +49-911-74053-482, Email: fehr(a)suse.de
GPG public key available.
To unsubscribe, e-mail: yast-devel+unsubscribe(a)opensuse.org
To contact the owner, e-mail: yast-devel+owner(a)opensuse.org