qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Zachary Amsden <zamsden@redhat.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH] Fix changing password using monitor over	VNC.
Date: Fri, 17 Apr 2009 17:31:01 -1000	[thread overview]
Message-ID: <49E94975.20408@redhat.com> (raw)
In-Reply-To: <49E83E62.3040006@siemens.com>

[-- Attachment #1: Type: text/plain, Size: 1330 bytes --]

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.



[-- Attachment #2: vnc-password-trunk.patch --]
[-- Type: text/plain, Size: 636 bytes --]

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;
 }

  reply	other threads:[~2009-04-18  3:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17  5:06 [Qemu-devel] [PATCH] Fix changing password using monitor over VNC Zachary Amsden
2009-04-17  7:00 ` [Qemu-devel] " Jan Kiszka
2009-04-17  7:43   ` Zachary Amsden
2009-04-17  8:31     ` Jan Kiszka
2009-04-18  3:31       ` Zachary Amsden [this message]
2009-04-18  8:41         ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49E94975.20408@redhat.com \
    --to=zamsden@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).