[libvirt] [PATCH 1/2] qemu: Assume that 'set_password' and 'expire_password' are supported

Ján Tomko jtomko at redhat.com
Tue Mar 26 12:39:27 UTC 2019


On Tue, Mar 26, 2019 at 01:03:03PM +0100, Peter Krempa wrote:
>They were added in qemu commit 7572150c189c6553c2448334116ab717680de66d
>released in v0.14.0.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_hotplug.c      | 20 --------------------
> src/qemu/qemu_monitor.c      |  1 -
> src/qemu/qemu_monitor_json.c | 12 ------------
> 3 files changed, 33 deletions(-)
>
>diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
>index c1d2d00016..c7c9a584f2 100644
>--- a/src/qemu/qemu_hotplug.c
>+++ b/src/qemu/qemu_hotplug.c
>@@ -4227,15 +4227,6 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver,
>         goto cleanup;
>     ret = qemuMonitorSetPassword(priv->mon, type, password, connected);
>
>-    if (ret == -2) {
>-        if (type != VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
>-            virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
>-                           _("Graphics password only supported for VNC"));
>-            ret = -1;
>-        } else {
>-            ret = qemuMonitorSetVNCPassword(priv->mon, password);
>-        }
>-    }
>     if (ret != 0)
>         goto end_job;
>
>@@ -4252,17 +4243,6 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver,
>
>     ret = qemuMonitorExpirePassword(priv->mon, type, expire);
>
>-    if (ret == -2) {
>-        /* XXX we could fake this with a timer */

Thankfully we never did.

>-        if (auth->expires) {
>-            virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
>-                           _("Expiry of passwords is not supported"));
>-            ret = -1;
>-        } else {
>-            ret = 0;
>-        }
>-    }
>-
>  end_job:
>     if (qemuDomainObjExitMonitor(driver, vm) < 0)
>         ret = -1;

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190326/07bacd1b/attachment-0001.sig>


More information about the libvir-list mailing list