All of lore.kernel.org
 help / color / mirror / Atom feed
* ioemu: empty vnc passwd
@ 2008-01-23 16:11 Samuel Thibault
  2008-01-23 16:19 ` Christoph Egger
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Samuel Thibault @ 2008-01-23 16:11 UTC (permalink / raw)
  To: xen-devel

Hello,

There is a small bug in xenstore.c: the following patch is needed
because else xenstore_read_vncpasswd would return 0 even when it is
unable to read the passwd.

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;
     }
 
     for (i=0; i<len && i<pwbuflen; i++) {

However, that means we can't use an empty passwd any more, while that
may be quite useful e.g. in testing environments, so that we would need
the following patch:

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

in order to just ignore a missing passwd.
What do people think about that?

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2008-01-23 18:06 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-23 16:11 ioemu: empty vnc passwd Samuel Thibault
2008-01-23 16:19 ` Christoph Egger
2008-01-23 16:23   ` John Levon
2008-01-23 16:28   ` Daniel P. Berrange
2008-01-23 16:36     ` Christoph Egger
2008-01-23 16:48       ` Daniel P. Berrange
2008-01-23 16:42     ` Samuel Thibault
2008-01-23 16:50       ` Daniel P. Berrange
2008-01-23 16:58         ` Samuel Thibault
2008-01-23 16:50       ` Samuel Thibault
2008-01-23 16:54         ` Daniel P. Berrange
2008-01-23 16:35 ` Daniel P. Berrange
2008-01-23 17:26   ` John Levon
2008-01-23 17:33     ` Daniel P. Berrange
2008-01-23 17:38       ` John Levon
2008-01-23 17:43         ` Daniel P. Berrange
2008-01-23 17:56           ` John Levon
2008-01-23 18:05             ` Daniel P. Berrange
2008-01-23 17:05 ` [PATCH] ioemu: handle " Samuel Thibault
2008-01-23 17:46   ` Keir Fraser
2008-01-23 17:49     ` Daniel P. Berrange
2008-01-23 18:06       ` Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.