[Libguestfs] [PATCH] lib: create: Allow any [[:alnum:]]+ string as a backingfmt parameter.
Pino Toscano
ptoscano at redhat.com
Fri Jun 9 08:30:47 UTC 2017
On Thursday, 8 June 2017 09:19:09 CEST Richard W.M. Jones wrote:
> If you use the libguestfs tools which open disk images read-only
> (eg. virt-df), with formats such as 'vdi', then you will see an error:
>
> error: invalid value for backingformat parameter 'vdi'
>
> This is because opening a disk image read-only will try to create a
> qcow2 file with the original image as a backing file. However the
> list of permitted backing formats was very restrictive and did not
> include 'vdi' (nor many other uncommon formats).
>
> Instead of using a whitelist for backing formats, just validate that
> the string is alphanumeric and short.
>
> Thanks: Mike Goodwin for reporting the bug.
> ---
LGTM.
Should there be a new test for trying to open vdi images?
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170609/9dfd2467/attachment.sig>
More information about the Libguestfs
mailing list