From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWTP1-0004Q4-N1 for qemu-devel@nongnu.org; Wed, 16 Oct 2013 11:52:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWTOv-0000eX-Od for qemu-devel@nongnu.org; Wed, 16 Oct 2013 11:52:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWTOv-0000eK-Gs for qemu-devel@nongnu.org; Wed, 16 Oct 2013 11:52:45 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9GFqiEn011258 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 16 Oct 2013 11:52:44 -0400 Received: from teriyaki.localdomain (ovpn-116-60.ams2.redhat.com [10.36.116.60]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r9GFqf4j027737 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 16 Oct 2013 11:52:43 -0400 From: Christophe Fergeau Date: Wed, 16 Oct 2013 17:52:33 +0200 Message-Id: <1381938753-28761-1-git-send-email-cfergeau@redhat.com> Subject: [Qemu-devel] [PATCH] Fix VNC SASL authentication when using a QXL device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ui/vnc.c:vnc_display_open() and spice-server/server/reds.c:do_spice_init() are both calling sasl_server_init(). If spice_server_set_sasl_appname() hasn't been called, spice-server will call it with "spice" as an appname, causing cyrus-sasl to try to use a /etc/sasl2/spice.conf config file rather than the /etc/sasl2/qemu.conf file that QEMU uses. When using -spice sasl on the command line, QEMU properly calls spice_server_set_sasl_appname() to set the SASL appname as "qemu", but when using a QXL device without using SPICE, spice_server_init() is called from qemu_spice_add_interface() without setting the appname to "qemu", which then causes the VNC code to try to use spice.conf instead of qemu.conf. Signed-off-by: Christophe Fergeau --- ui/spice-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/spice-core.c b/ui/spice-core.c index 33ef837..d7566b0 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -833,6 +833,7 @@ int qemu_spice_add_interface(SpiceBaseInstance *sin) * With a command line like '-vnc :0 -vga qxl' you'll end up here. */ spice_server = spice_server_new(); + spice_server_set_sasl_appname(spice_server, "qemu"); spice_server_init(spice_server, &core_interface); qemu_add_vm_change_state_handler(vm_change_state_handler, NULL); } -- 1.8.3.1