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 12/13] set vnc password from xenstore.

To: Gerd Hoffmann <kraxel@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 12/13] set vnc password from xenstore.
From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Date: Thu, 21 Aug 2008 21:17:08 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, qemu-devel@xxxxxxxxxx
Delivery-date: Thu, 21 Aug 2008 13:17:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1219336054-15919-13-git-send-email-kraxel@xxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1219336054-15919-1-git-send-email-kraxel@xxxxxxxxxx> <1219336054-15919-13-git-send-email-kraxel@xxxxxxxxxx>
Reply-to: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
What is the justification for this change. We already have a means
to set the VNC password from the monitor. If this isn't sufficient
we should introduce an additional method which isn't Xen specific.

I know XenD currently sends the passwords to QEMU via xenstore,
but that's not a good reason to preserve this approach. XenD
does lots of stuff via XenStore which it should be doing via
command line arguments - such as setting up disks instead of using
the -drive param.

IMHO, XenD should just set the VNC password by connecting to the
monitor. That's what its there for after all.

Daniel

On Thu, Aug 21, 2008 at 06:27:33PM +0200, Gerd Hoffmann wrote:
> 
> Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx>
> ---
>  hw/xen_machine_pv.c |   26 ++++++++++++++++++++++++++
>  1 files changed, 26 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c
> index 851837c..9f18742 100644
> --- a/hw/xen_machine_pv.c
> +++ b/hw/xen_machine_pv.c
> @@ -24,6 +24,7 @@
>  
>  #include "hw.h"
>  #include "boards.h"
> +#include "console.h"
>  
>  #include "xen_backend.h"
>  
> @@ -110,6 +111,29 @@ static int xen_init_pv(DisplayState *ds)
>      return 0;
>  }
>  
> +static void xen_init_vnc(void)
> +{
> +    char xspath[256], *dom = NULL, *vm = NULL, *pw = NULL;
> +    int len;
> +
> +    dom = xs_get_domain_path(xenstore, xen_domid);
> +    snprintf(xspath, sizeof(xspath), "%s/vm", dom);
> +    vm = xs_read(xenstore, 0, xspath, &len);
> +    if (!vm)
> +        goto out;
> +    snprintf(xspath, sizeof(xspath), "%s/vncpassword", vm);
> +    pw = xs_read(xenstore, 0, xspath, &len);
> +    if (!pw || !strlen(pw))
> +        goto out;
> +    vnc_display_password(NULL, pw);
> +    fprintf(stderr, "vnc password set from xenstore\n");
> +
> +out:
> +    free(dom);
> +    free(vm);
> +    free(pw);
> +}
> +
>  /* -------------------------------------------------------------------- */
>  /* paravirtualized xen machine                                          */
>  
> @@ -136,6 +160,8 @@ static void xenpv_init(ram_addr_t ram_size, int 
> vga_ram_size,
>          goto err;
>      }
>  
> +    xen_init_vnc();
> +
>      /* create dummy cpu, halted */
>      if (cpu_model == NULL) {
>  #ifdef TARGET_X86_64
> -- 
> 1.5.5.1
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

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

<Prev in Thread] Current Thread [Next in Thread>