Re: [PATCH] qemu_shim: Require absolute path for root directory

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

 





On Wed, Mar 22, 2023 at 2:30 PM Michal Privoznik <mprivozn@xxxxxxxxxx> 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@xxxxxxxxxx>
---
 src/qemu/qemu_shim.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

 
Reviewed-by: Kristina Hanicova <khanicov@xxxxxxxxxx>

Kristina

[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