From: Ian Jackson Date: Thu, 19 Jun 2008 09:21:17 +0000 (+0100) Subject: Set VNC password from xenstore. X-Git-Tag: xen-3.3.0-rc1~69 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5570f85e1e3b616bae4d5aa6fa727b3a5c3e429a;p=qemu-xen-3.3-testing.git Set VNC password from xenstore. 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. --- diff --git a/vl.c b/vl.c index a562c00f..ace82cfa 100644 --- 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);