]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: properly handle '=' in the VNC socket path
authorPavel Hrdina <phrdina@redhat.com>
Fri, 21 Jul 2017 17:54:33 +0000 (19:54 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Thu, 27 Jul 2017 08:49:55 +0000 (10:49 +0200)
If a domain name contains a '=' and the unix socket path is
auto-generated or socket path provided by user contains '=' QEMU
is unable to properly parse the command line.  In order to make it
work we need to use the new command line syntax for VNC if it's
available, otherwise we can use the old syntax.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1352529

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_command.c

index 59ad93a4cba3a562facd4bf81ab4ce0a5b06208b..e7a3c4289e8233e74d897d1fd621e9c273817992 100644 (file)
@@ -7784,7 +7784,10 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg,
 
     switch (glisten->type) {
     case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCKET:
-        virBufferAddLit(&opt, "unix:");
+        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VNC_MULTI_SERVERS))
+            virBufferAddLit(&opt, "vnc=unix:");
+        else
+            virBufferAddLit(&opt, "unix:");
         virQEMUBuildBufferEscapeComma(&opt, glisten->socket);
         break;