]> git.ipfire.org Git - thirdparty/qemu.git/commit
hmp: Unbreak "change vnc"
authorMarkus Armbruster <armbru@redhat.com>
Thu, 9 Sep 2021 08:12:18 +0000 (10:12 +0200)
committerMichael Roth <michael.roth@amd.com>
Tue, 14 Dec 2021 14:56:41 +0000 (08:56 -0600)
commit7637373b23f32fb88e100df455addc4107a054dc
tree043cf358340eea0da4419d91dc3a62d2494c5331
parent4c34ef3d341deff67bed735efca91d2ce0f9368c
hmp: Unbreak "change vnc"

HMP command "change vnc" can take the password as argument, or prompt
for it:

    (qemu) change vnc password 123
    (qemu) change vnc password
    Password: ***
    (qemu)

This regressed in commit cfb5387a1d "hmp: remove "change vnc TARGET"
command", v6.0.0.

    (qemu) change vnc passwd 123
    Password: ***
    (qemu) change vnc passwd
    (qemu)

The latter passes NULL to qmp_change_vnc_password(), which is a no-no.
Looks like it puts the display into "password required, but none set"
state.

The logic error is easy to miss in review, but testing should've
caught it.

Fix the obvious way.

Fixes: cfb5387a1de2acda23fb5c97d2378b9e7ddf8025
Cc: qemu-stable@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20210909081219.308065-2-armbru@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
(cherry picked from commit 6193344f9337f8b76cd44ce94a32c9900d907d35)
Signed-off-by: Michael Roth <michael.roth@amd.com>
monitor/hmp-cmds.c