From nobody Sun Feb 8 23:26:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1553601794956279.12776622993067; Tue, 26 Mar 2019 05:03:14 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 244643092662; Tue, 26 Mar 2019 12:03:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E7D8390CFC; Tue, 26 Mar 2019 12:03:12 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9C394180338A; Tue, 26 Mar 2019 12:03:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x2QC39Cp004373 for ; Tue, 26 Mar 2019 08:03:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id DD19F1001E6F; Tue, 26 Mar 2019 12:03:09 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C2561091EF8; Tue, 26 Mar 2019 12:03:09 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Tue, 26 Mar 2019 13:03:03 +0100 Message-Id: <5fce0115f91369d6d8c6eeb1fd274dbee77e6038.1553601735.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 1/2] qemu: Assume that 'set_password' and 'expire_password' are supported X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 26 Mar 2019 12:03:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" They were added in qemu commit 7572150c189c6553c2448334116ab717680de66d released in v0.14.0. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- 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 d= river, goto cleanup; ret =3D qemuMonitorSetPassword(priv->mon, type, password, connected); - if (ret =3D=3D -2) { - if (type !=3D VIR_DOMAIN_GRAPHICS_TYPE_VNC) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Graphics password only supported for VNC")); - ret =3D -1; - } else { - ret =3D qemuMonitorSetVNCPassword(priv->mon, password); - } - } if (ret !=3D 0) goto end_job; @@ -4252,17 +4243,6 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr d= river, ret =3D qemuMonitorExpirePassword(priv->mon, type, expire); - if (ret =3D=3D -2) { - /* XXX we could fake this with a timer */ - if (auth->expires) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Expiry of passwords is not supported")); - ret =3D -1; - } else { - ret =3D 0; - } - } - end_job: if (qemuDomainObjExitMonitor(driver, vm) < 0) ret =3D -1; diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 0eb7f60e38..d406ecfab3 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2395,7 +2395,6 @@ qemuMonitorTypeToProtocol(int type) } -/* Returns -2 if not supported with this monitor connection */ int qemuMonitorSetPassword(qemuMonitorPtr mon, int type, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 5c16e1f3a1..77c1eaa335 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2781,7 +2781,6 @@ int qemuMonitorJSONSetVNCPassword(qemuMonitorPtr mon, return ret; } -/* Returns -1 on error, -2 if not supported */ int qemuMonitorJSONSetPassword(qemuMonitorPtr mon, const char *protocol, const char *password, @@ -2800,11 +2799,6 @@ int qemuMonitorJSONSetPassword(qemuMonitorPtr mon, if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) goto cleanup; - if (qemuMonitorJSONHasError(reply, "CommandNotFound")) { - ret =3D -2; - goto cleanup; - } - if (qemuMonitorJSONCheckError(cmd, reply) < 0) goto cleanup; @@ -2815,7 +2809,6 @@ int qemuMonitorJSONSetPassword(qemuMonitorPtr mon, return ret; } -/* Returns -1 on error, -2 if not supported */ int qemuMonitorJSONExpirePassword(qemuMonitorPtr mon, const char *protocol, const char *expire_time) @@ -2832,11 +2825,6 @@ int qemuMonitorJSONExpirePassword(qemuMonitorPtr mon, if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) goto cleanup; - if (qemuMonitorJSONHasError(reply, "CommandNotFound")) { - ret =3D -2; - goto cleanup; - } - if (qemuMonitorJSONCheckError(cmd, reply) < 0) goto cleanup; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list