The DBus conditional was renamed way back: commit da77f04ed5fa0731d50b947be8c739bdbf8121ad Author: Daniel P. Berrange <berrange@xxxxxxxxxx> Date: Thu Sep 20 15:05:39 2012 +0100 Convert HAVE_DBUS to WITH_DBUS but the shutdown inhibit code was not updated. Thus libvirt was never inhibiting shutdown by a logged in user when VMs are running. Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> --- daemon/libvirtd.c | 4 ++-- src/rpc/virnetdaemon.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index db239f0..a558458 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -795,7 +795,7 @@ static void daemonInhibitCallback(bool inhibit, void *opaque) } -#ifdef HAVE_DBUS +#ifdef WITH_DBUS static DBusConnection *sessionBus; static DBusConnection *systemBus; @@ -887,7 +887,7 @@ static void daemonRunStateInit(void *opaque) driversInitialized = true; -#ifdef HAVE_DBUS +#ifdef WITH_DBUS /* Tie the non-privileged libvirtd to the session/shutdown lifecycle */ if (!virNetDaemonIsPrivileged(dmn)) { diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c index fabacf2..782417e 100644 --- a/src/rpc/virnetdaemon.c +++ b/src/rpc/virnetdaemon.c @@ -437,7 +437,7 @@ virNetDaemonAutoShutdown(virNetDaemonPtr dmn, } -#if defined(HAVE_DBUS) && defined(DBUS_TYPE_UNIX_FD) +#if defined(WITH_DBUS) && defined(DBUS_TYPE_UNIX_FD) static void virNetDaemonGotInhibitReply(DBusPendingCall *pending, void *opaque) @@ -529,7 +529,7 @@ virNetDaemonAddShutdownInhibition(virNetDaemonPtr dmn) VIR_DEBUG("dmn=%p inhibitions=%zu", dmn, dmn->autoShutdownInhibitions); -#if defined(HAVE_DBUS) && defined(DBUS_TYPE_UNIX_FD) +#if defined(WITH_DBUS) && defined(DBUS_TYPE_UNIX_FD) if (dmn->autoShutdownInhibitions == 1) virNetDaemonCallInhibit(dmn, "shutdown", -- 2.9.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list