[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH] Fix changing password using monitor over VN

From: Zachary Amsden
Subject: Re: [Qemu-devel] Re: [PATCH] Fix changing password using monitor over VNC.
Date: Fri, 17 Apr 2009 17:31:01 -1000
User-agent: Thunderbird (X11/20090317)

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.

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 
     VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
+    if (!vs)
+        return -1;
     if (vs->password) {
         vs->password = NULL;
@@ -2090,6 +2093,9 @@ int vnc_display_password(DisplayState *ds, const char 
         if (!(vs->password = qemu_strdup(password)))
             return -1;
+    if (vs->auth == VNC_AUTH_NONE) {
+        vs->auth = VNC_AUTH_VNC;
+    }
     return 0;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]