[libvirt] [PATCH] xml: shell-escape domain name in comment

Jiri Denemark jdenemar at redhat.com
Wed Oct 24 12:59:33 UTC 2012


On Wed, Oct 24, 2012 at 14:03:12 +0200, Ján Tomko wrote:
> Add virBufferEscapeShellXMLComment function that both quotes a string so
> shell deosn't interpert any special characters in it and makes sure that
> there's no "--" in it, to avoid clashes with XML comments.
> 
> virXMLEmitWarning is changed to use virBuffer and use the above function
> on the domain name.

I should have spoken earlier but why don't we just emit UUID there? It's
guaranteed that it is safe for both XML and shell and thus can be just
copy&pasted even into interactive virsh.

Jirka




More information about the libvir-list mailing list