From patchwork Thu Jun 6 15:18:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 249455 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 24B602C0090 for ; Fri, 7 Jun 2013 01:19:22 +1000 (EST) Received: from localhost ([::1]:54594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkbyC-00013E-5R for incoming@patchwork.ozlabs.org; Thu, 06 Jun 2013 11:19:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ukbxr-0000zH-CG for qemu-devel@nongnu.org; Thu, 06 Jun 2013 11:19:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ukbxl-00064C-9Q for qemu-devel@nongnu.org; Thu, 06 Jun 2013 11:18:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40544) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ukbxl-00063g-15 for qemu-devel@nongnu.org; Thu, 06 Jun 2013 11:18:53 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r56FIqtM002068 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 Jun 2013 11:18:52 -0400 Received: from shalem.localdomain.com (vpn1-5-247.ams2.redhat.com [10.36.5.247]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r56FInEB024972; Thu, 6 Jun 2013 11:18:51 -0400 From: Hans de Goede To: Gerd Hoffmann Date: Thu, 6 Jun 2013 17:18:48 +0200 Message-Id: <1370531928-2431-2-git-send-email-hdegoede@redhat.com> In-Reply-To: <1370531928-2431-1-git-send-email-hdegoede@redhat.com> References: <1370531928-2431-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Hans de Goede , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH] spice: Add -spice disable-agent-file-transfer cmdline option (rhbz#961850) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Hans de Goede --- qemu-options.hx | 7 +++++-- ui/spice-core.c | 12 ++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index bf94862..b62e542 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -917,8 +917,8 @@ DEF("spice", HAS_ARG, QEMU_OPTION_spice, " [,jpeg-wan-compression=[auto|never|always]]\n" " [,zlib-glz-wan-compression=[auto|never|always]]\n" " [,streaming-video=[off|all|filter]][,disable-copy-paste]\n" - " [,agent-mouse=[on|off]][,playback-compression=[on|off]]\n" - " [,seamless-migration=[on|off]]\n" + " [,disable-agent-file-xfer][,agent-mouse=[on|off]]\n" + " [,playback-compression=[on|off]][,seamless-migration=[on|off]]\n" " enable spice\n" " at least one of {port, tls-port} is mandatory\n", QEMU_ARCH_ALL) @@ -961,6 +961,9 @@ Allow client connects without authentication. @item disable-copy-paste Disable copy paste between the client and the guest. +@item disable-agent-file-xfer +Disable spice-vdagent based file-xfer 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 bcc4199..2faac93 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -446,6 +446,9 @@ static QemuOptsList qemu_spice_opts = { .name = "disable-copy-paste", .type = QEMU_OPT_BOOL, },{ + .name = "disable-agent-file-xfer", + .type = QEMU_OPT_BOOL, + },{ .name = "sasl", .type = QEMU_OPT_BOOL, },{ @@ -739,6 +742,15 @@ void qemu_spice_init(void) spice_server_set_agent_copypaste(spice_server, false); } + if (qemu_opt_get_bool(opts, "disable-agent-file-xfer", 0)) { +#if SPICE_SERVER_VERSION >= 0x000c04 + spice_server_set_agent_file_xfer(spice_server, false); +#else + error_report("this qemu build does not support the \"disable-agent-file-xfer\" option"); + exit(1); +#endif + } + compression = SPICE_IMAGE_COMPRESS_AUTO_GLZ; str = qemu_opt_get(opts, "image-compression"); if (str) {