[libvirt] [PATCH] command: shell-quote when logging commands

Eric Blake eblake at redhat.com
Fri Aug 31 16:01:24 UTC 2012


On 08/28/2012 07:08 PM, Daniel Veillard wrote:
> On Tue, Aug 28, 2012 at 11:16:13AM -0700, Eric Blake wrote:
>> Without this patch, logged command executions can be ambiguous if
>> the command contained any shell metacharacters.  This has caused
>> more than one person to attempt to patch clients to add unnecessary
>> quoting, without realizing that the command itself was run with
>> correct args, and only the logged output was ambiguous.
>>
>> * src/util/command.c (virCommandToString): Add shell escapes.
>> * tests/commandtest.c (test16): Test new behavior.
>> * tests/commanddata/test16.log: Update expected output.
>> * tests/qemuxml2argvdata/qemuxml2argv-*.args: Likewise.
>> * tests/networkxml2argvdata/*.argv: Likewise.

> 
>   ACK, sounds right, but I would rather push it after the release,

Thanks; pushed now that we are after the release.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120831/4bdd74ec/attachment-0001.sig>


More information about the libvir-list mailing list