]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Fix QMP Capabability Probing Failure
authorViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Mon, 26 Nov 2012 14:17:13 +0000 (15:17 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 28 Nov 2012 14:54:29 +0000 (14:54 +0000)
commit1a50ba2cb07d8bb2aa724062889deb9efd7ad9e9
tree1f1735d6bb3ef288dfceeca33e993a975cd88d07
parent7a95eccc816cfd37377d2fcf3978522c50c072b8
qemu: Fix QMP Capabability Probing Failure

QMP Capability probing will fail if QEMU cannot bind to the
QMP monitor socket in the qemu_driver->libDir directory.
That's because the child process is stripped of all
capabilities and this directory is chown'ed to the configured
QEMU user/group (normally qemu:qemu) by the QEMU driver.

To prevent this from happening, the driver startup will now pass
the QEMU uid and gid down to the capability probing code.
All capability probing invocations of QEMU will be run with
the configured QEMU uid instead of libvirtd's.

Furter, the pid file handling is moved to libvirt, as QEMU
cannot write to the qemu_driver->runDir (root:root). This also
means that the libvirt daemonizing must be used.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
src/qemu/qemu_driver.c