public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Yellis Services <www-dnGHPjz5XwqsTnJN9+BGXg@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: qemu vnc auth
Date: Tue, 30 Jan 2007 13:25:43 +0000	[thread overview]
Message-ID: <20070130132543.GA18642@redhat.com> (raw)
In-Reply-To: <1c9701c74466$a2933da0$0100a8c0@manu>

On Tue, Jan 30, 2007 at 01:03:20PM +0100, Yellis Services wrote:
> Hello,
> 
> I have adapted a xen path to kvm-qemu.
> This patch enable auth in vnc
> 
> qemu ../.. -hda=/home/os.img -vnc -vncpasswd toto
> 
> work with vncviewer on linux and Win.
> Don't work with vncviewer applet via http, must be fixed.

Passing passwords around on the command line is not really a viable
implementation because they can trivially be snooped by any user
on the system. Likewise environment variables are not suitable.

I suggest two approaches:

 1. Pass the name of a file containing the password on the command
    line. QEMU can then read the password from this file. This is
    the approach taken by the regular VNC server - eg it stores a
    passwd in $HOME/.vnc/passwd. This passwd file can be chmod 0600
    to secure it from other userseg. This is useful for a user who
    is laucnhing qemu process mannually and wants to make them all
    use a single passwd.

     qemu ../.. -hda=/home/os.img -vnc -vncpasswdfile /path/to/file

 2. Allow the password to be passed to the QEMU process via a file
    descriptor. This is useful if the QEMU process is being launched
    by some form of management process, letting the parent process
    easily control the password per-QEMU process without writing out
    a great many files.

     qemu ../.. -hda=/home/os.img -vnc -vncpasswdfd  7

So in fact I think it would be very useful to implement both approaches,
because they serve different use cases and I don't think there would be
too much code overhead in having both supported.

Aside from how you supply the initial password, the rest of the patch
looks good to me. It would probably be worthwhile posting this to 
upstream qemu-devel too, to avoid the need for further KVM-specific fork
of the codebae.

Regards,
Dan
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

      parent reply	other threads:[~2007-01-30 13:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-30 12:03 qemu vnc auth Yellis Services
2007-01-30 13:05 ` Avi Kivity
     [not found]   ` <45BF42A6.5090505-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-01-30 15:04     ` Anthony Liguori
2007-01-30 13:25 ` Daniel P. Berrange [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070130132543.GA18642@redhat.com \
    --to=berrange-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=www-dnGHPjz5XwqsTnJN9+BGXg@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox