Re: [PATCH] conf: cpu: Fix to escape cpu model, vendor_id and vendor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 20, 2012 at 05:33:20PM +0900, Ken ICHIKAWA wrote:
> This patch fixes a problem that encoded xml special charas
> of cpu model, vendor_id and vendor are saved as decoded xml
> special charas.
> 
> If I define model name including encoded xml special charas
> in domain XML like below:
> <domain>
>   <cpu mode='custom' match='exact'>
>     <model fallback='allow'>&gt;&lt;</model>
>   </cpu>
> </domain>
> 
> domain xml definition file is saved as
> <domain>
>   <cpu mode='custom' match='exact'>
>     <model fallback='allow'>><</model>
>   </cpu>
> </domain>
> 
> After that, if libvirtd is restarted, dumpxml command, edit
> command and etc. are disabled with below error until I stop
> libvirtd and fix the xml file manually.
> 
> 2012-12-20 04:56:54.371+0000: 11893: error : catchXMLError:691 :
> /etc/libvirt/qemu/f17.xml:25: StartTag: invalid element name
>     <model fallback='allow'>><</model>
> ------------------------------^
> 
> Also vendor_id and vendor have same problem.
> 
> Signed-off-by: Ken ICHIKAWA <ichikawa.ken@xxxxxxxxxxxxxx>
> ---
>  src/conf/cpu_conf.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

ACK to the proposed fix, but for this kind of flaw I prefer to
see some kind of test case added to validate the XML formatting.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]