All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxl: don't require vncpasswd when empty
@ 2011-02-11 10:08 Christoph Egger
  2011-02-11 16:45 ` Ian Jackson
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Egger @ 2011-02-11 10:08 UTC (permalink / raw)
  To: xen-devel

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


Hi!

Attached patch fixes a regression introduced in c/s 22866:ed9ef3b07d2a:

Don't require a NULL-byte password when the guest config file
has the entry
     vncpasswd=''

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: xen_libxl_vncpasswd.diff --]
[-- Type: text/x-diff, Size: 534 bytes --]

diff -r 12de39a2c580 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c	Thu Feb 10 15:18:51 2011 +0100
+++ b/tools/libxl/libxl_dm.c	Fri Feb 11 11:03:59 2011 +0100
@@ -74,7 +74,7 @@ static char ** libxl_build_device_model_
         } else {
             vncarg = "127.0.0.1:0";
         }
-        if (info->vncpasswd)
+        if (info->vncpasswd && (info->vncpasswd[0] != '\0'))
             vncarg = libxl__sprintf(gc, "%s,password", vncarg);
         flexarray_append(dm_args, "-vnc");
         flexarray_append(dm_args, vncarg);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

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

* Re: [PATCH] libxl: don't require vncpasswd when empty
  2011-02-11 10:08 [PATCH] libxl: don't require vncpasswd when empty Christoph Egger
@ 2011-02-11 16:45 ` Ian Jackson
  2011-02-14 14:58   ` Christoph Egger
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Jackson @ 2011-02-11 16:45 UTC (permalink / raw)
  To: Christoph Egger; +Cc: xen-devel

Christoph Egger writes ("[Xen-devel] [PATCH] libxl: don't require vncpasswd when empty"):
> Attached patch fixes a regression introduced in c/s 22866:ed9ef3b07d2a:
> 
> Don't require a NULL-byte password when the guest config file
> has the entry
>      vncpasswd=''

I'm afraid I don't understand this patch.

If you say "vncpasswd=''" in the config file then info->vncpasswd
would be "" and therefore info->vncpasswd[0] would be '\0' so the
branch would not be taken and you would end up without ",password" on
the qemu command line.  The result should be that qemu should not
require a password.

Is that not what you would intend with such a config statement ?

Your patch seems to do the opposite of what you say it does.  It would
seem to make qemu require an empty string as a password, which is
daft.

Ian.

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

* Re: [PATCH] libxl: don't require vncpasswd when empty
  2011-02-11 16:45 ` Ian Jackson
@ 2011-02-14 14:58   ` Christoph Egger
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Egger @ 2011-02-14 14:58 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Friday 11 February 2011 17:45:03 Ian Jackson wrote:
> Christoph Egger writes ("[Xen-devel] [PATCH] libxl: don't require vncpasswd 
when empty"):
> > Attached patch fixes a regression introduced in c/s 22866:ed9ef3b07d2a:
> >
> > Don't require a NULL-byte password when the guest config file
> > has the entry
> >      vncpasswd=''
>
> I'm afraid I don't understand this patch.
>
> If you say "vncpasswd=''" in the config file then info->vncpasswd
> would be "" and therefore info->vncpasswd[0] would be '\0' so the
> branch would not be taken and you would end up without ",password" on 
> the qemu command line.  The result should be that qemu should not
> require a password.

I actually end up with ",password" on qemu command line because

    info->vncpasswd != info->vncpasswd[0] :-)

The command 'ps axuww | grep qemu' makes that visible.

> Is that not what you would intend with such a config statement ?
>
> Your patch seems to do the opposite of what you say it does.  It would
> seem to make qemu require an empty string as a password, which is
> daft.

Yes, qemu wants me to enter a NULL-byte as password.
With my patch, qemu doesn't ask me for a password at all.

Christoph


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

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

end of thread, other threads:[~2011-02-14 14:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-11 10:08 [PATCH] libxl: don't require vncpasswd when empty Christoph Egger
2011-02-11 16:45 ` Ian Jackson
2011-02-14 14:58   ` Christoph Egger

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.