]> git.proxmox.com Git - qemu.git/commitdiff
spice: add option for disabling copy paste support
authorHans de Goede <hdegoede@redhat.com>
Sun, 27 Mar 2011 14:43:54 +0000 (16:43 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 6 Jun 2011 07:14:42 +0000 (09:14 +0200)
Some people want to be able disable spice's guest <-> client copy paste support
because of security considerations.

[ kraxel: drop old-version error message ]

qemu-config.c
qemu-options.hx
ui/spice-core.c

index 5d7ffa2f237e46d7f8e970f9dcf503b4e3bc0af7..04c97e52c27588faff0cfe5d473c85fbcb5ca48b 100644 (file)
@@ -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,
index 82e085a2298183d47c8aa18d13b5e60c563beb43..63e8cb0a1b8db1860fcc9dfa4012028e001405b7 100644 (file)
@@ -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=<nr>
 Set the TCP port spice is listening on for encrypted channels.
 
index ef56ed61a9f2711e726cd18d005c76237609bb6d..a3351f39b576abc5782673c50679b40367938c90 100644 (file)
@@ -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) {