qemu-conf: add configurable dbus-daemon location

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Marc-André Lureau 2020-02-25 10:55:06 +01:00 committed by Michal Privoznik
parent 62f696c333
commit 6f3bc53407
6 changed files with 17 additions and 0 deletions

View File

@ -110,6 +110,12 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_QEMU], [
[/usr/bin:/usr/libexec])
AC_DEFINE_UNQUOTED([QEMU_SLIRP_HELPER], ["$QEMU_SLIRP_HELPER"],
[QEMU slirp helper])
AC_PATH_PROG([QEMU_DBUS_DAEMON], [dbus-daemon],
[/usr/bin/dbus-daemon],
[/usr/bin:/usr/libexec])
AC_DEFINE_UNQUOTED([QEMU_DBUS_DAEMON], ["$QEMU_DBUS_DAEMON"],
[QEMU dbus daemon])
])
AC_DEFUN([LIBVIRT_DRIVER_RESULT_QEMU], [

View File

@ -89,6 +89,7 @@ module Libvirtd_qemu =
| str_entry "bridge_helper"
| str_entry "pr_helper"
| str_entry "slirp_helper"
| str_entry "dbus_daemon"
| bool_entry "set_process_name"
| int_entry "max_processes"
| int_entry "max_files"

View File

@ -835,6 +835,9 @@
# Path to the SLIRP networking helper.
#slirp_helper = "/usr/bin/slirp-helper"
# Path to the dbus-daemon
#dbus_daemon = "/usr/bin/dbus-daemon"
# User for the swtpm TPM Emulator
#
# Default is 'tss'; this is the same user that tcsd (TrouSerS) installs

View File

@ -263,6 +263,7 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged,
cfg->bridgeHelperName = g_strdup(QEMU_BRIDGE_HELPER);
cfg->prHelperName = g_strdup(QEMU_PR_HELPER);
cfg->slirpHelperName = g_strdup(QEMU_SLIRP_HELPER);
cfg->dbusDaemonName = g_strdup(QEMU_DBUS_DAEMON);
cfg->securityDefaultConfined = true;
cfg->securityRequireConfined = false;
@ -350,6 +351,7 @@ static void virQEMUDriverConfigDispose(void *obj)
VIR_FREE(cfg->bridgeHelperName);
VIR_FREE(cfg->prHelperName);
VIR_FREE(cfg->slirpHelperName);
VIR_FREE(cfg->dbusDaemonName);
VIR_FREE(cfg->saveImageFormat);
VIR_FREE(cfg->dumpImageFormat);
@ -641,6 +643,9 @@ virQEMUDriverConfigLoadProcessEntry(virQEMUDriverConfigPtr cfg,
if (virConfGetValueString(conf, "slirp_helper", &cfg->slirpHelperName) < 0)
return -1;
if (virConfGetValueString(conf, "dbus_daemon", &cfg->dbusDaemonName) < 0)
return -1;
if (virConfGetValueBool(conf, "set_process_name", &cfg->setProcessName) < 0)
return -1;
if (virConfGetValueUInt(conf, "max_processes", &cfg->maxProcesses) < 0)

View File

@ -157,6 +157,7 @@ struct _virQEMUDriverConfig {
char *bridgeHelperName;
char *prHelperName;
char *slirpHelperName;
char *dbusDaemonName;
bool macFilter;

View File

@ -105,6 +105,7 @@ module Test_libvirtd_qemu =
{ "memory_backing_dir" = "/var/lib/libvirt/qemu/ram" }
{ "pr_helper" = "/usr/bin/qemu-pr-helper" }
{ "slirp_helper" = "/usr/bin/slirp-helper" }
{ "dbus_daemon" = "/usr/bin/dbus-daemon" }
{ "swtpm_user" = "tss" }
{ "swtpm_group" = "tss" }
{ "capability_filters"