[PATCH] qemu_shim: Require absolute path for root directory
Kristina Hanicova
khanicov at redhat.com
Wed Mar 22 13:57:49 UTC 2023
On Wed, Mar 22, 2023 at 2:30 PM Michal Privoznik <mprivozn at redhat.com>
wrote:
> The virConnectOpen(), well virConnectOpenInternal() reports an
> error if embed root is not an absolute path. This is a fair
> requirement, but our qemu_shim doesn't check this requirement and
> instead mkdir()-s passed path only to fail later on, leaving the
> empty directory behind:
I would reword the commit message a bit:
This is a fair requirement, but our qemu_shim doesn't check this
requirement and passes the path to mkdir(), only to fail later on,
leaving the empty directory behind:
>
> $ ls -d asd
> ls: cannot access 'asd': No such file or directory
>
> $ virt-qemu-run -r asd whatever.xml
> virt-qemu-run: cannot open qemu:///embed?root=asd: unsupported
> configuration: root path must be absolute
>
> $ ls -d asd
> asd
>
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
> src/qemu/qemu_shim.c | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
Reviewed-by: Kristina Hanicova <khanicov at redhat.com>
Kristina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20230322/dfc22f50/attachment.htm>
More information about the libvir-list
mailing list