From: Pavel Hrdina Date: Fri, 21 Jul 2017 17:54:33 +0000 (+0200) Subject: qemu: properly handle '=' in the VNC socket path X-Git-Tag: v3.6.0-rc1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed4d1653ede210b8bf23a70796716165f5c24380;p=thirdparty%2Flibvirt.git qemu: properly handle '=' in the VNC socket path 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 --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 59ad93a4cb..e7a3c4289e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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;