From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lv1HN-0003YL-Qm for qemu-devel@nongnu.org; Fri, 17 Apr 2009 23:31:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lv1HH-0003Y9-VZ for qemu-devel@nongnu.org; Fri, 17 Apr 2009 23:31:44 -0400 Received: from [199.232.76.173] (port=53889 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lv1HH-0003Y6-Ov for qemu-devel@nongnu.org; Fri, 17 Apr 2009 23:31:39 -0400 Received: from mx2.redhat.com ([66.187.237.31]:41623) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lv1HH-0001HO-84 for qemu-devel@nongnu.org; Fri, 17 Apr 2009 23:31:39 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3I3Vb7P000450 for ; Fri, 17 Apr 2009 23:31:37 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3I3VagH026908 for ; Fri, 17 Apr 2009 23:31:37 -0400 Received: from [10.11.12.241] (vpn-12-241.rdu.redhat.com [10.11.12.241]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3I3VZEm001846 for ; Fri, 17 Apr 2009 23:31:36 -0400 Message-ID: <49E94975.20408@redhat.com> Date: Fri, 17 Apr 2009 17:31:01 -1000 From: Zachary Amsden MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] Fix changing password using monitor over VNC. References: <1239944809-14327-1-git-send-email-zamsden@redhat.com> <49E8292A.8080900@web.de> <49E8332D.8090500@redhat.com> <49E83E62.3040006@siemens.com> In-Reply-To: <49E83E62.3040006@siemens.com> Content-Type: multipart/mixed; boundary="------------040402090009070802010701" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------040402090009070802010701 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Jan Kiszka wrote: > Zachary Amsden wrote: >> Jan Kiszka wrote: >>> Zachary Amsden wrote: >>>> A simple segfault turned out to be a relatively complex fix. >>>> >>>> The monitor calls back to main_loop_wait() to wait for the completion >>>> of the password change event; this results in a nested invocation of >>> This is no longer true with trunk as this nasty blocking password >>> reading has been converted into an async operation. Is your patch >>> required nevertheless? Or is this band-aid for stable? >> I confirmed the bug, verified the fix on a git tree sync'd today from >> git://git.savannah.nongnu.org/qemu.git >> >> let me know if this is not the trunk. > > Nope, it's outdated. Last check in is from end of January this year. > > There are several up-to-date git mirrors, one e.g. at kernel.org: > git://git.kernel.org/pub/scm/virt/qemu/qemu.git. However, I prefer to do > my own mirroring with git svn. > >> Sorry, as I am new to qemu development. > > No problem. The issue you found is probably still relevant for stable > 0.10.x, so please consider this branch as well. The patch applies as is to stable branch. And this new patch fixes two bugs on trunk: 1) Changing VNC password should set password auth if it wasn't yet enabled 2) Trying to change VNC password on a SDL-only display gives a segfault. --------------040402090009070802010701 Content-Type: text/plain; name="vnc-password-trunk.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vnc-password-trunk.patch" diff --git a/vnc.c b/vnc.c index ab1f044..c49ce61 100644 --- a/vnc.c +++ b/vnc.c @@ -2082,6 +2082,9 @@ int vnc_display_password(DisplayState *ds, const char *password) { VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display; + if (!vs) + return -1; + if (vs->password) { qemu_free(vs->password); vs->password = NULL; @@ -2090,6 +2093,9 @@ int vnc_display_password(DisplayState *ds, const char *password) if (!(vs->password = qemu_strdup(password))) return -1; } + if (vs->auth == VNC_AUTH_NONE) { + vs->auth = VNC_AUTH_VNC; + } return 0; } --------------040402090009070802010701--