]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
libxl: Fix setting vncpasswd to empty string
authorAnthony PERARD <anthony.perard@citrix.com>
Mon, 4 Nov 2019 15:30:47 +0000 (15:30 +0000)
committerWei Liu <wl@xen.org>
Tue, 12 Nov 2019 10:39:01 +0000 (10:39 +0000)
Before 93dcc22, error from setting the vnc password to an empty
string, when QEMU wasn't expected a password, never prevented the creation
of a guest, and only logged an error message.

Reported-by: Roger Pau Monné <roger.pau@citrix.com>
Fixes: 93dcc22fe798c9fa5ce117f1ed6db0d8bd779020
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
Release-acked-by: Juergen Gross <jgross@suse.com>
tools/libxl/libxl_dm.c

index 7e52f097317241bcb4bbf0b580cf8a26226605f6..8e0fb78bd2f32fe8439ede8e9512d67f2b26b35a 100644 (file)
@@ -2936,7 +2936,7 @@ static void device_model_postconfig_vnc(libxl__egc *egc,
         if (rc) goto out;
     }
 
-    if (vnc && vnc->passwd) {
+    if (vnc && vnc->passwd && vnc->passwd[0]) {
         qmp->callback = device_model_postconfig_vnc_passwd;
         libxl__qmp_param_add_string(gc, &args, "password", vnc->passwd);
         rc = libxl__ev_qmp_send(gc, qmp, "change-vnc-password", args);