提交 23f55840 编写于 作者: A Anya Harter 提交者: John Ferlan

qemu: Escape commas for qemuBuildGrapicsSPICECommandLine

Add comma escaping for cfg->spiceTLSx509certdir and
graphics->data.spice.rendernode.
Signed-off-by: NAnya Harter <aharter@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 0234a275
...@@ -7974,8 +7974,11 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg, ...@@ -7974,8 +7974,11 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg,
!cfg->spicePassword) !cfg->spicePassword)
virBufferAddLit(&opt, "disable-ticketing,"); virBufferAddLit(&opt, "disable-ticketing,");
if (hasSecure) if (hasSecure) {
virBufferAsprintf(&opt, "x509-dir=%s,", cfg->spiceTLSx509certdir); virBufferAddLit(&opt, "x509-dir=");
virQEMUBuildBufferEscapeComma(&opt, cfg->spiceTLSx509certdir);
virBufferAddLit(&opt, ",");
}
switch (graphics->data.spice.defaultMode) { switch (graphics->data.spice.defaultMode) {
case VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_SECURE: case VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_SECURE:
...@@ -8082,7 +8085,9 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg, ...@@ -8082,7 +8085,9 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg,
goto error; goto error;
} }
virBufferAsprintf(&opt, "rendernode=%s,", graphics->data.spice.rendernode); virBufferAddLit(&opt, "rendernode=");
virQEMUBuildBufferEscapeComma(&opt, graphics->data.spice.rendernode);
virBufferAddLit(&opt, ",");
} }
} }
......
...@@ -33,6 +33,7 @@ cert3=cert3,db=/etc/pki/nssdb,,foo,id=smartcard0,bus=ccid0.0 \ ...@@ -33,6 +33,7 @@ cert3=cert3,db=/etc/pki/nssdb,,foo,id=smartcard0,bus=ccid0.0 \
-chardev pipe,id=charchannel0,path=/tmp/guestfwd,,foo \ -chardev pipe,id=charchannel0,path=/tmp/guestfwd,,foo \
-netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=user-channel0 \ -netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=user-channel0 \
-vnc unix:/tmp/lib/domain--1-foo=1,,bar=2/vnc.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 \ -spice unix,addr=/tmp/lib/domain--1-foo=1,,bar=2/spice.sock,gl=on,\
-vga cirrus \ rendernode=/dev/dri/foo,,bar \
-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
</graphics> </graphics>
<graphics type='spice'> <graphics type='spice'>
<listen type='socket'/> <listen type='socket'/>
<gl enable='yes' rendernode='/dev/dri/foo,bar'/>
</graphics> </graphics>
<serial type='dev'> <serial type='dev'>
<source path='/dev/ttyS2,foo'/> <source path='/dev/ttyS2,foo'/>
......
...@@ -2763,6 +2763,11 @@ mymain(void) ...@@ -2763,6 +2763,11 @@ mymain(void)
QEMU_CAPS_DEVICE_CIRRUS_VGA, QEMU_CAPS_DEVICE_CIRRUS_VGA,
QEMU_CAPS_SPICE, QEMU_CAPS_SPICE,
QEMU_CAPS_SPICE_UNIX, QEMU_CAPS_SPICE_UNIX,
QEMU_CAPS_DEVICE_VIRTIO_GPU,
QEMU_CAPS_VIRTIO_GPU_VIRGL,
QEMU_CAPS_SPICE_GL,
QEMU_CAPS_SPICE_RENDERNODE,
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
QEMU_CAPS_DEVICE_ISA_SERIAL, QEMU_CAPS_DEVICE_ISA_SERIAL,
QEMU_CAPS_CHARDEV_FILE_APPEND, QEMU_CAPS_CHARDEV_FILE_APPEND,
QEMU_CAPS_CCID_EMULATED); QEMU_CAPS_CCID_EMULATED);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册