提交 8f827f2a 编写于 作者: P Pavel Hrdina

qemu: skip only ',' for VNC and Spice unix socket

Commit 824272cb attempted to fix escaping of characters in unix
socket path but it was wrong.  We need to escape only ',', there is
no escape character for '='.
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
上级 382bdbfe
......@@ -7927,7 +7927,7 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg,
switch (glisten->type) {
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCKET:
virBufferAddLit(&opt, "unix:");
virQEMUBuildBufferEscape(&opt, glisten->socket);
virQEMUBuildBufferEscapeComma(&opt, glisten->socket);
break;
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS:
......@@ -8060,7 +8060,7 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg,
}
virBufferAddLit(&opt, "unix,addr=");
virQEMUBuildBufferEscape(&opt, glisten->socket);
virQEMUBuildBufferEscapeComma(&opt, glisten->socket);
virBufferAddLit(&opt, ",");
hasInsecure = true;
break;
......
......@@ -20,7 +20,7 @@ bar=2/monitor.sock,server,nowait \
-no-acpi \
-boot c \
-usb \
-vnc 'unix:/tmp/lib/domain--1-foo\=1,,bar\=2/vnc.sock' \
-spice 'unix,addr=/tmp/lib/domain--1-foo\=1,,bar\=2/spice.sock' \
-vnc unix:/tmp/lib/domain--1-foo=1,,bar=2/vnc.sock \
-spice unix,addr=/tmp/lib/domain--1-foo=1,,bar=2/spice.sock \
-vga cirrus \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册