[libvirt] [PATCH 4/4] qemu: Reject attempts to create snapshots with names containig '/'

Peter Krempa pkrempa at redhat.com
Mon Jan 21 19:47:54 UTC 2013


On 01/21/13 20:19, Peter Krempa wrote:
> On 01/21/13 20:12, Peter Krempa wrote:
>> On 01/21/13 20:05, Eric Blake wrote:
>>> On 01/17/2013 06:12 AM, Peter Krempa wrote:
>>>> The snapshot name is used to create path to the definition save file.
>>>> When the name contains slashes the creation of the file fails. Reject
>>>> such names.
>>>
>>> Should we also reject "." and ".." as snapshot names, since those also
>>> conflict with our usage of turning the snapshot name into a file name?
>>>
>>
>> Hm, libvirt seems to save the configs correctly but is not able to read
>> them back. The question is if we should fix the loading code, or just
>> prohibit leading dots? Dots later in the file name are okay.
>
> Hm, yeah ... the snapshot loading code excludes them:
>
>      while ((entry = readdir(dir))) {
>          if (entry->d_name[0] == '.')
>              continue;
>
> ...
>

I proposed a patch to relax that check:

http://www.redhat.com/archives/libvir-list/2013-January/msg01471.html

>>
>> Peter
>>
>> --
>> libvir-list mailing list
>> libvir-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/libvir-list
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list




More information about the libvir-list mailing list