aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Durgin <josh.durgin@dreamhost.com>2012-02-25 16:48:02 -0800
committerEric Blake <eblake@redhat.com>2012-02-27 16:06:02 -0700
commitf27f616ff899732fe90ce1f0f4abb3887cea5e17 (patch)
treee2541384c0367ea1607b65a0909bac1cd6941147 /.gitignore
parentqemu: Add ability to abort existing console while creating new one (diff)
downloadlibvirt-f27f616ff899732fe90ce1f0f4abb3887cea5e17.tar.gz
libvirt-f27f616ff899732fe90ce1f0f4abb3887cea5e17.tar.bz2
libvirt-f27f616ff899732fe90ce1f0f4abb3887cea5e17.zip
qemu: unescape HMP commands before converting them to json
QMP commands don't need to be escaped since converting them to json also escapes special characters. When a QMP command fails, however, libvirt falls back to HMP commands. These fallback functions (qemuMonitorText*) do their own escaping, and pass the result directly to qemuMonitorHMPCommandWithFd. If the monitor is in json mode, these pre-escaped commands will be escaped again when converted to json, which can result in the wrong arguments being sent. For example, a filename test\file would be sent in json as test\\file. This prevented attaching an image file with a " or \ in its name in qemu 1.0.50, and also broke rbd attachment (which uses backslashes to escape some internal arguments.) Reported-by: Masuko Tomoya <tomoya.masuko@gmail.com> Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com> Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to '.gitignore')
-rw-r--r--.gitignore1
1 files changed, 1 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index b7561dc93..264a419c8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -128,6 +128,7 @@
/tests/openvzutilstest
/tests/qemuargv2xmltest
/tests/qemuhelptest
+/tests/qemumonitortest
/tests/qemuxmlnstest
/tests/qparamtest
/tests/reconnect