WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] ioemu: handle empty vnc passwd

To: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] ioemu: handle empty vnc passwd
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 17:46:33 +0000
Cc: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Delivery-date: Wed, 23 Jan 2008 09:47:01 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080123170554.GF5188@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Achd5+RaIzSdl8nbEdyZHgAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH] ioemu: handle empty vnc passwd
User-agent: Microsoft-Entourage/11.3.6.070618
If the only caller of xenstore_read_vncpasswd() is not checking the return
code, why continue to have xenstore_read_vncpasswd() return an error code at
all?

If that is fixed, and Daniel Berrange will ack the patch, then I'll take it.

 -- Keir

On 23/1/08 17:05, "Samuel Thibault" <samuel.thibault@xxxxxxxxxxxxx> wrote:

> ioemu: handle empty vnc passwd
> Have xenstore_read_vncpasswd return -1 when it is unable to read the
> passwd from XenStore (and store an empty password).  However, don't exit
> in such case since it may just mean that the use didn't set a passwd.
> If he really did, xend would have given the passwd flag in the -vnc
> option, and the empty passwd would make the vnc authentication reject
> any password anyway.
> 
> Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
> 
> diff -r 9e92672385a5 tools/ioemu/xenstore.c
> --- a/tools/ioemu/xenstore.c Wed Jan 23 13:37:03 2008 +0000
> +++ b/tools/ioemu/xenstore.c Wed Jan 23 15:53:01 2008 +0000
> @@ -518,7 +518,7 @@ int xenstore_read_vncpasswd(int domid, c
>          pwbuf[0] = '\0';
>          free(uuid);
>          free(path);
> -        return rc;
> +        return -1;
>      }
> diff -r 9e92672385a5 tools/ioemu/vl.c
> --- a/tools/ioemu/vl.c Wed Jan 23 13:37:03 2008 +0000
> +++ b/tools/ioemu/vl.c Wed Jan 23 15:55:38 2008 +0000
> @@ -7756,8 +7756,7 @@ int main(int argc, char **argv)
> int vnc_display_port;
> char password[20];
> vnc_display_init(ds);
> - if (xenstore_read_vncpasswd(domid, password, sizeof(password)) < 0)
> -     exit(0);
> + xenstore_read_vncpasswd(domid, password, sizeof(password));
> vnc_display_password(ds, password);
> if ((vnc_display_port = vnc_display_open(ds, vnc_display, vncunused)) < 0)
>    exit (0);
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel