Re: [PATCH] qemu: Escape external snapshot names containing comma

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

 



On 2/13/19 3:58 PM, John Ferlan wrote:
> 
> 
> On 2/12/19 11:33 PM, Eric Blake wrote:
>> The code for creating external snapshots for an offline domain
>> called out to qemu-img without escaping commas in the manner
>> that qemu-img expects. This also fixes a typo in the comment.
>>
>> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
>> ---
>>
>> Noticed by code inspection; I did not try very hard to see how
>> easy or hard it would be to convince libvirt to actually try
>> and create an external snapshot to /path/file,with,comma to
>> see how things break.
>>
>>  src/qemu/qemu_driver.c | 15 ++++++++++-----
>>  1 file changed, 10 insertions(+), 5 deletions(-)
>>
> 
> Oh joy another place that uses qemu-img...
> 
> Looks like qemuDomainSnapshotForEachQcow2Raw uses virDomainDiskGetSource
> or disk def->src->path as well for qemuimgarg[4].

Urgh, so it does. And it uses virRun() instead of the nicer
virCommand... API :( I'll save that for a separate patch,

> 
> Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

and have pushed this one.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[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]

  Powered by Linux