]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu_shim: Allow other users to enter the root dir
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 28 Feb 2020 13:42:44 +0000 (14:42 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 5 Mar 2020 10:24:38 +0000 (11:24 +0100)
commit63af64d78df609c28080ebf17dc4200d0bb5d004
tree819b33b510279e9605e382ed30085cc53637d4d7
parent6799b72d927015db4ce4cab879f072abc91a41ae
qemu_shim: Allow other users to enter the root dir

When virt-qemu-run is ran without any root directory specified on
the command line, a temporary directory is made and used instead.
But since we are using g_dir_make_tmp() to create the directory
it is going to have 0700 mode. So even though we create the whole
directory structure under it and label everything, QEMU is very
likely to not have the access. This is because in this case there
is no qemu.conf and thus distro default UID:GID is used to run
QEMU (e.g. qemu:kvm on Fedora). Change the mode of the temporary
directory so that everybody has eXecute permission.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/qemu/qemu_shim.c