aboutsummaryrefslogtreecommitdiff
path: root/qerror.h
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2011-06-23 13:31:42 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-07-23 11:19:02 -0500
commit13661089810d3e59931f3e80d7cb541b99af7071 (patch)
tree56f507cd78ea65ca7cb8e500d7b9ce57e54f7981 /qerror.h
parent7e7e2ebc942da8285931ceabf12823e165dced8b (diff)
downloadqemu-13661089810d3e59931f3e80d7cb541b99af7071.zip
qemu-13661089810d3e59931f3e80d7cb541b99af7071.tar.gz
qemu-13661089810d3e59931f3e80d7cb541b99af7071.tar.bz2
Introduce a 'client_add' monitor command accepting an open FD
Allow client connections for VNC and socket based character devices to be passed in over the monitor using SCM_RIGHTS. One intended usage scenario is to start QEMU with VNC on a UNIX domain socket. An unprivileged user which cannot access the UNIX domain socket, can then connect to QEMU's VNC server by passing an open FD to libvirt, which passes it onto QEMU. { "execute": "get_fd", "arguments": { "fdname": "myclient" } } { "return": {} } { "execute": "add_client", "arguments": { "protocol": "vnc", "fdname": "myclient", "skipauth": true } } { "return": {} } In this case 'protocol' can be 'vnc' or 'spice', or the name of a character device (eg from -chardev id=XXXX) The 'skipauth' parameter can be used to skip any configured VNC authentication scheme, which is useful if the mgmt layer talking to the monitor has already authenticated the client in another way. * console.h: Define 'vnc_display_add_client' method * monitor.c: Implement 'client_add' command * qemu-char.c, qemu-char.h: Add 'qemu_char_add_client' method * qerror.c, qerror.h: Add QERR_ADD_CLIENT_FAILED * qmp-commands.hx: Declare 'client_add' command * ui/vnc.c: Implement 'vnc_display_add_client' method Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qerror.h')
-rw-r--r--qerror.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/qerror.h b/qerror.h
index 7ec0fc1..8058456 100644
--- a/qerror.h
+++ b/qerror.h
@@ -166,6 +166,9 @@ QError *qobject_to_qerror(const QObject *obj);
#define QERR_SET_PASSWD_FAILED \
"{ 'class': 'SetPasswdFailed', 'data': {} }"
+#define QERR_ADD_CLIENT_FAILED \
+ "{ 'class': 'AddClientFailed', 'data': {} }"
+
#define QERR_TOO_MANY_FILES \
"{ 'class': 'TooManyFiles', 'data': {} }"