]> xenbits.xensource.com Git - qemu-xen-3.3-testing.git/commitdiff
Set VNC password from xenstore.
authorIan Jackson <iwj@mariner.uk.xensource.com>
Thu, 19 Jun 2008 09:21:17 +0000 (10:21 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 19 Jun 2008 09:21:17 +0000 (10:21 +0100)
Upstream doesn't appear to have a way to set the password other than
from the monitor, so we introduce this which is a bit messy.

When upstream's new option/config parsing is merged, we should make a
patch for upstream with a config option to read the password out of a
file or fd, and use that.

vl.c

diff --git a/vl.c b/vl.c
index a562c00f3800a6aebf91cd4e4c615bfab70f7130..ace82cfa125e8bc6c31b827e18e63d43d671f4ef 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -8669,7 +8669,10 @@ int main(int argc, char **argv)
         dumb_display_init(ds);
     } else if (vnc_display != NULL || vncunused != 0) {
        int vnc_display_port;
+        char password[20];
         vnc_display_init(ds);
+        xenstore_read_vncpasswd(domid, password, sizeof(password));
+        vnc_display_password(ds, password);
         vnc_display_port = vnc_display_open(ds, vnc_display, vncunused);
         if (vnc_display < 0)
             exit(1);