From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMiN4-0001UK-Hy for qemu-devel@nongnu.org; Wed, 18 May 2011 11:09:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMiN1-0003uS-GL for qemu-devel@nongnu.org; Wed, 18 May 2011 11:09:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMiN1-0003tw-6Z for qemu-devel@nongnu.org; Wed, 18 May 2011 11:09:07 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4IF967M027415 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 18 May 2011 11:09:06 -0400 From: Gerd Hoffmann Date: Wed, 18 May 2011 17:08:59 +0200 Message-Id: <1305731343-27110-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1305731343-27110-1-git-send-email-kraxel@redhat.com> References: <1305731343-27110-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 2/6] spice: add option for disabling copy paste support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Hans de Goede From: Hans de Goede 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 | 3 +++ qemu-options.hx | 3 +++ ui/spice-core.c | 6 ++++++ 3 files changed, 12 insertions(+), 0 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index 5d7ffa2..04c97e5 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -385,6 +385,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 82e085a..63e8cb0 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 ef56ed6..a3351f3 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) { -- 1.7.1