From: Hans de Goede Date: Sun, 27 Mar 2011 14:43:54 +0000 (+0200) Subject: spice: add option for disabling copy paste support X-Git-Tag: v0.15.0-rc0~181^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4970b071f698a4f3984487bbb97d1ecc36f5950;p=thirdparty%2Fqemu.git spice: add option for disabling copy paste support Some people want to be able disable spice's guest <-> client copy paste support because of security considerations. [ kraxel: drop old-version error message ] --- diff --git a/qemu-config.c b/qemu-config.c index 5d7ffa2f237..04c97e52c27 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -384,6 +384,9 @@ QemuOptsList qemu_spice_opts = { },{ .name = "disable-ticketing", .type = QEMU_OPT_BOOL, + },{ + .name = "disable-copy-paste", + .type = QEMU_OPT_BOOL, },{ .name = "x509-dir", .type = QEMU_OPT_STRING, diff --git a/qemu-options.hx b/qemu-options.hx index 82e085a2298..63e8cb0a1b8 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -717,6 +717,9 @@ Set the password you need to authenticate. @item disable-ticketing Allow client connects without authentication. +@item disable-copy-paste +Disable copy paste between the client and the guest. + @item tls-port= Set the TCP port spice is listening on for encrypted channels. diff --git a/ui/spice-core.c b/ui/spice-core.c index ef56ed61a9f..a3351f39b57 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -554,6 +554,12 @@ void qemu_spice_init(void) spice_server_set_noauth(spice_server); } +#if SPICE_SERVER_VERSION >= 0x000801 + if (qemu_opt_get_bool(opts, "disable-copy-paste", 0)) { + spice_server_set_agent_copypaste(spice_server, false); + } +#endif + compression = SPICE_IMAGE_COMPRESS_AUTO_GLZ; str = qemu_opt_get(opts, "image-compression"); if (str) {