Received: from eggs.gnu.org ([2001:4830:134:3::10]:37533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zkan4-00027H-9V for qemu-devel@nongnu.org; Fri, 09 Oct 2015 12:45:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zkalo-0001lr-3A for qemu-devel@nongnu.org; Fri, 09 Oct 2015 12:45:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zkali-0001fM-A2 for qemu-devel@nongnu.org; Fri, 09 Oct 2015 12:43:42 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 4F4638F30F for ; Fri, 9 Oct 2015 16:43:41 +0000 (UTC) Received: from edamame.cdg.redhat.com (ovpn-116-131.ams2.redhat.com [10.36.116.131]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t99GhdLq019700 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 9 Oct 2015 12:43:40 -0400 Date: Fri, 9 Oct 2015 18:43:38 +0200 From: Christophe Fergeau Message-ID: <20151009164338.GA3653@edamame.cdg.redhat.com> References: <1439565057-18889-1-git-send-email-cfergeau@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline In-Reply-To: <1439565057-18889-1-git-send-email-cfergeau@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] spice: Allow to set password even if disable-ticketing was used List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey, On Fri, Aug 14, 2015 at 05:10:57PM +0200, Christophe Fergeau wrote: > Before commit b1ea7b79e1, it was possible to start with -spice > disable-ticketing, and then use the "set_password spice" command to > enable ticketing with SPICE. Since commit b1ea7b79e1 this is no longer > possible as qemu_spice_set_ticket() will return an error unless the > 'auth' type is "spice". When ticketing is disabled, 'auth' is "none" so > the attempt to set password fails. >=20 > This commit allows to call qemu_spice_set_ticket() when 'auth' is "none" > and changes 'auth' to "spice" when this happens. >=20 > Signed-off-by: Christophe Fergeau > Reviewed-by: Daniel P. Berrange Any taker for that patch? Thanks, Christophe > --- > Changes since v1: > - added Reviewed-by and missing Signed-off-by tags >=20 >=20 > ui/spice-core.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/ui/spice-core.c b/ui/spice-core.c > index 4da3042..3b20c6c 100644 > --- a/ui/spice-core.c > +++ b/ui/spice-core.c > @@ -882,6 +882,10 @@ static int qemu_spice_set_ticket(bool fail_if_conn, = bool disconnect_if_conn) > int qemu_spice_set_passwd(const char *passwd, > bool fail_if_conn, bool disconnect_if_conn) > { > + if (strcmp(auth, "none") =3D=3D 0) { > + /* Allow to set a password when started with 'disable-ticketing'= */ > + auth =3D "spice"; > + } > if (strcmp(auth, "spice") !=3D 0) { > return -1; > } > --=20 > 2.4.3 >=20 >=20 --KsGdsel6WgEHnImy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJWF+66AAoJEKnYwhQprGyCwFcP+wWwlWsZOx7QqRfbigYzGBkJ uM85QXVm0BfyGiNRQFXi7fFryhNZ7b/4QlyEj+elLHXcnH7m5w3kAfKTgMpDpcNt k+dYezGbrz8xqfhgqQqTuLGOuwQ424Ef6sXCFB/+0FRQQR619nddLO2YN6Y/DhQA sTiU9gSuoK3M2HEwOt3WJnyX35/AbrBPfNHp8kmO7DjdoxBgWOYGbbCDRQgZQzwi pVboyRIubfEKXVxZqkFOMihQH9ZCjPJtAJZqyC2kjMsxOVhfow4FL6/WgNcHWYEC 94zSpnwqTHFDH1sj27Zgf1A2HZxYYn7Nbjut1ZEcUDfDL/nW25831MbED5FdAmjI W8Nnev9jBhGFTit1pPXScbF+mDQzdSs3Aiph0DyqMMKcakqOBurHLLGpzu5+ui23 5QHp5ATgoiQXHW2EvBFgk4Rv81yEpkaAPNfi2sGb/B9w5EwaLO/gGUzLs4wCeQRM T5ZJ55Y1zBFD0bb2J3hHXM8YmgJdB/RMBCLoOrGSbbu8ulJbT42DvdSpvfRhYQzc Lq4vTdx/RuG/ySrgCzZIVQ9nKCYvozpposh2xtdTdHZbN/QmFEE1qr0/wJwzmhU6 N1g1pXqr2KeWL7lpIvkmov85bs4NLa1hni5Sf9KsRYs/KSGcgGo6PUys1QX97hJt yMJaxtlI43WjwnMDs2FW =cCJc -----END PGP SIGNATURE----- --KsGdsel6WgEHnImy--