From: Peter Krempa Date: Tue, 16 Sep 2014 13:37:08 +0000 (+0200) Subject: qemu: time: Report errors if agent command fails X-Git-Tag: CVE-2014-3633~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98fd3b7f0b1af179336e55ddee6163580a927d93;p=thirdparty%2Flibvirt.git qemu: time: Report errors if agent command fails Commit b606bbb4 broke reporting of errors when setting of guest time fails via the guest agent as the return value is not checked and later overwritten by the return value qemuMonitorRTCResetReinjection(); Fix this by checking the return value before resetting the RTC reinjection. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1142294 --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 6008aeb078..15ad64de43 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17134,6 +17134,9 @@ qemuDomainSetTime(virDomainPtr dom, rv = qemuAgentSetTime(priv->agent, seconds, nseconds, rtcSync); qemuDomainObjExitAgent(vm); + if (rv < 0) + goto endjob; + if (!virDomainObjIsActive(vm)) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("domain is not running"));