* [PATCH] tools/libxl: prepare vnc options for dm_args in libxl__build_device_model_args_new
@ 2011-04-20 6:30 ZhouPeng
2011-04-20 12:10 ` Stefano Stabellini
2011-05-09 12:30 ` Ian Jackson
0 siblings, 2 replies; 5+ messages in thread
From: ZhouPeng @ 2011-04-20 6:30 UTC (permalink / raw)
To: ian.jackson, Stefano Stabellini; +Cc: Xen-Devel (E-mail)
[-- Attachment #1: Type: text/plain, Size: 2075 bytes --]
This pacth clean up vnc options preparing code for xen-upstream-qemu.
Add password option which allows you to use vncpasswd auth by xl.
Signed-off-by: Zhou Peng <zhoupeng@nfs.iscas.ac.cn>
tools/libxl: prepare vnc options for dm_args in
libxl__build_device_model_args_new
diff -r 569abaf2cc12 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c Tue Apr 19 13:17:14 2011 +0800
+++ b/tools/libxl/libxl_dm.c Wed Apr 20 13:47:42 2011 +0800
@@ -208,11 +208,7 @@ static char ** libxl__build_device_model
if (info->vnc || info->vncdisplay || info->vnclisten || info->vncunused) {
int display = 0;
const char *listen = "127.0.0.1";
-
- if (info->vncpasswd && info->vncpasswd[0]) {
- assert(!"missing code for supplying vnc password to qemu");
- }
- flexarray_append(dm_args, "-vnc");
+ char *vncoptions = NULL;
if (info->vncdisplay) {
display = info->vncdisplay;
@@ -224,13 +220,17 @@ static char ** libxl__build_device_model
}
if (strchr(listen, ':') != NULL)
- flexarray_append(dm_args,
- libxl__sprintf(gc, "%s%s", listen,
- info->vncunused ? ",to=99" : ""));
+ vncoptions = libxl__sprintf(gc,
+ "%s%s", listen, info->vncunused ? ",to=99" : "");
else
- flexarray_append(dm_args,
- libxl__sprintf(gc, "%s:%d%s", listen, display,
- info->vncunused ? ",to=99" : ""));
+ vncoptions = libxl__sprintf(gc, "%s:%d%s", listen, display,
+ info->vncunused ? ",to=99" : "");
+
+ if (info->vncpasswd && info->vncpasswd[0])
+ vncoptions = libxl__sprintf(gc, "%s,password", vncoptions);
+
+ flexarray_append(dm_args, "-vnc");
+ flexarray_append(dm_args, vncoptions);
}
if (info->sdl) {
flexarray_append(dm_args, "-sdl");
--
Zhou Peng
Operating System Technology Group
Institute of Software, the Chinese Academy of Sciences (ISCAS)
[-- Attachment #2: tools-libxl-vncoptions.diff --]
[-- Type: text/x-patch, Size: 1968 bytes --]
This pacth clean up vnc options preparing code for xen-upstream-qemu.
Add password option which allows you to use vncpasswd auth by xl.
Signed-off-by: Zhou Peng <zhoupeng@nfs.iscas.ac.cn>
tools/libxl: prepare vnc options for dm_args in libxl__build_device_model_args_new
diff -r 569abaf2cc12 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c Tue Apr 19 13:17:14 2011 +0800
+++ b/tools/libxl/libxl_dm.c Wed Apr 20 13:47:42 2011 +0800
@@ -208,11 +208,7 @@ static char ** libxl__build_device_model
if (info->vnc || info->vncdisplay || info->vnclisten || info->vncunused) {
int display = 0;
const char *listen = "127.0.0.1";
-
- if (info->vncpasswd && info->vncpasswd[0]) {
- assert(!"missing code for supplying vnc password to qemu");
- }
- flexarray_append(dm_args, "-vnc");
+ char *vncoptions = NULL;
if (info->vncdisplay) {
display = info->vncdisplay;
@@ -224,13 +220,17 @@ static char ** libxl__build_device_model
}
if (strchr(listen, ':') != NULL)
- flexarray_append(dm_args,
- libxl__sprintf(gc, "%s%s", listen,
- info->vncunused ? ",to=99" : ""));
+ vncoptions = libxl__sprintf(gc,
+ "%s%s", listen, info->vncunused ? ",to=99" : "");
else
- flexarray_append(dm_args,
- libxl__sprintf(gc, "%s:%d%s", listen, display,
- info->vncunused ? ",to=99" : ""));
+ vncoptions = libxl__sprintf(gc, "%s:%d%s", listen, display,
+ info->vncunused ? ",to=99" : "");
+
+ if (info->vncpasswd && info->vncpasswd[0])
+ vncoptions = libxl__sprintf(gc, "%s,password", vncoptions);
+
+ flexarray_append(dm_args, "-vnc");
+ flexarray_append(dm_args, vncoptions);
}
if (info->sdl) {
flexarray_append(dm_args, "-sdl");
[-- 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] 5+ messages in thread* Re: [PATCH] tools/libxl: prepare vnc options for dm_args in libxl__build_device_model_args_new
2011-04-20 6:30 [PATCH] tools/libxl: prepare vnc options for dm_args in libxl__build_device_model_args_new ZhouPeng
@ 2011-04-20 12:10 ` Stefano Stabellini
2011-04-21 1:35 ` ZhouPeng
2011-05-09 12:30 ` Ian Jackson
1 sibling, 1 reply; 5+ messages in thread
From: Stefano Stabellini @ 2011-04-20 12:10 UTC (permalink / raw)
To: ZhouPeng; +Cc: Xen-Devel (E-mail), Ian Jackson, Stefano Stabellini
On Wed, 20 Apr 2011, ZhouPeng wrote:
> This pacth clean up vnc options preparing code for xen-upstream-qemu.
> Add password option which allows you to use vncpasswd auth by xl.
>
>
> Signed-off-by: Zhou Peng <zhoupeng@nfs.iscas.ac.cn>
>
> tools/libxl: prepare vnc options for dm_args in
> libxl__build_device_model_args_new
The patch looks OK to me.
Thanks,
Stefano
>
> diff -r 569abaf2cc12 tools/libxl/libxl_dm.c
> --- a/tools/libxl/libxl_dm.c Tue Apr 19 13:17:14 2011 +0800
> +++ b/tools/libxl/libxl_dm.c Wed Apr 20 13:47:42 2011 +0800
> @@ -208,11 +208,7 @@ static char ** libxl__build_device_model
> if (info->vnc || info->vncdisplay || info->vnclisten || info->vncunused) {
> int display = 0;
> const char *listen = "127.0.0.1";
> -
> - if (info->vncpasswd && info->vncpasswd[0]) {
> - assert(!"missing code for supplying vnc password to qemu");
> - }
> - flexarray_append(dm_args, "-vnc");
> + char *vncoptions = NULL;
>
> if (info->vncdisplay) {
> display = info->vncdisplay;
> @@ -224,13 +220,17 @@ static char ** libxl__build_device_model
> }
>
> if (strchr(listen, ':') != NULL)
> - flexarray_append(dm_args,
> - libxl__sprintf(gc, "%s%s", listen,
> - info->vncunused ? ",to=99" : ""));
> + vncoptions = libxl__sprintf(gc,
> + "%s%s", listen, info->vncunused ? ",to=99" : "");
> else
> - flexarray_append(dm_args,
> - libxl__sprintf(gc, "%s:%d%s", listen, display,
> - info->vncunused ? ",to=99" : ""));
> + vncoptions = libxl__sprintf(gc, "%s:%d%s", listen, display,
> + info->vncunused ? ",to=99" : "");
> +
> + if (info->vncpasswd && info->vncpasswd[0])
> + vncoptions = libxl__sprintf(gc, "%s,password", vncoptions);
> +
> + flexarray_append(dm_args, "-vnc");
> + flexarray_append(dm_args, vncoptions);
> }
> if (info->sdl) {
> flexarray_append(dm_args, "-sdl");
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] tools/libxl: prepare vnc options for dm_args in libxl__build_device_model_args_new
2011-04-20 12:10 ` Stefano Stabellini
@ 2011-04-21 1:35 ` ZhouPeng
0 siblings, 0 replies; 5+ messages in thread
From: ZhouPeng @ 2011-04-21 1:35 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: Xen-Devel (E-mail), Ian Jackson
Thanks.
2011/4/20 Stefano Stabellini <stefano.stabellini@eu.citrix.com>:
> On Wed, 20 Apr 2011, ZhouPeng wrote:
>> This pacth clean up vnc options preparing code for xen-upstream-qemu.
>> Add password option which allows you to use vncpasswd auth by xl.
>>
>>
>> Signed-off-by: Zhou Peng <zhoupeng@nfs.iscas.ac.cn>
>>
>> tools/libxl: prepare vnc options for dm_args in
>> libxl__build_device_model_args_new
>
>
> The patch looks OK to me.
> Thanks,
>
> Stefano
>
>>
>> diff -r 569abaf2cc12 tools/libxl/libxl_dm.c
>> --- a/tools/libxl/libxl_dm.c Tue Apr 19 13:17:14 2011 +0800
>> +++ b/tools/libxl/libxl_dm.c Wed Apr 20 13:47:42 2011 +0800
>> @@ -208,11 +208,7 @@ static char ** libxl__build_device_model
>> if (info->vnc || info->vncdisplay || info->vnclisten || info->vncunused) {
>> int display = 0;
>> const char *listen = "127.0.0.1";
>> -
>> - if (info->vncpasswd && info->vncpasswd[0]) {
>> - assert(!"missing code for supplying vnc password to qemu");
>> - }
>> - flexarray_append(dm_args, "-vnc");
>> + char *vncoptions = NULL;
>>
>> if (info->vncdisplay) {
>> display = info->vncdisplay;
>> @@ -224,13 +220,17 @@ static char ** libxl__build_device_model
>> }
>>
>> if (strchr(listen, ':') != NULL)
>> - flexarray_append(dm_args,
>> - libxl__sprintf(gc, "%s%s", listen,
>> - info->vncunused ? ",to=99" : ""));
>> + vncoptions = libxl__sprintf(gc,
>> + "%s%s", listen, info->vncunused ? ",to=99" : "");
>> else
>> - flexarray_append(dm_args,
>> - libxl__sprintf(gc, "%s:%d%s", listen, display,
>> - info->vncunused ? ",to=99" : ""));
>> + vncoptions = libxl__sprintf(gc, "%s:%d%s", listen, display,
>> + info->vncunused ? ",to=99" : "");
>> +
>> + if (info->vncpasswd && info->vncpasswd[0])
>> + vncoptions = libxl__sprintf(gc, "%s,password", vncoptions);
>> +
>> + flexarray_append(dm_args, "-vnc");
>> + flexarray_append(dm_args, vncoptions);
>> }
>> if (info->sdl) {
>> flexarray_append(dm_args, "-sdl");
>
>
--
Zhou Peng
Operating System Technology Group
Institute of Software, the Chinese Academy of Sciences (ISCAS)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/libxl: prepare vnc options for dm_args in libxl__build_device_model_args_new
2011-04-20 6:30 [PATCH] tools/libxl: prepare vnc options for dm_args in libxl__build_device_model_args_new ZhouPeng
2011-04-20 12:10 ` Stefano Stabellini
@ 2011-05-09 12:30 ` Ian Jackson
2011-05-10 11:32 ` ZhouPeng
1 sibling, 1 reply; 5+ messages in thread
From: Ian Jackson @ 2011-05-09 12:30 UTC (permalink / raw)
To: ZhouPeng; +Cc: Xen-Devel (E-mail), Stefano Stabellini
ZhouPeng writes ("[Xen-devel] [PATCH] tools/libxl: prepare vnc options for dm_args in libxl__build_device_model_args_new"):
> This pacth clean up vnc options preparing code for xen-upstream-qemu.
> Add password option which allows you to use vncpasswd auth by xl.
How does the new qemu actually find out what the password is ? AFAICT
from the current code, it is only written to xenstore. Does the new
qemu read it from there like the old one ?
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] tools/libxl: prepare vnc options for dm_args in libxl__build_device_model_args_new
2011-05-09 12:30 ` Ian Jackson
@ 2011-05-10 11:32 ` ZhouPeng
0 siblings, 0 replies; 5+ messages in thread
From: ZhouPeng @ 2011-05-10 11:32 UTC (permalink / raw)
To: Ian Jackson; +Cc: Xen-Devel (E-mail), Stefano Stabellini
2011/5/9 Ian Jackson <Ian.Jackson@eu.citrix.com>:
> ZhouPeng writes ("[Xen-devel] [PATCH] tools/libxl: prepare vnc options for dm_args in libxl__build_device_model_args_new"):
>> This pacth clean up vnc options preparing code for xen-upstream-qemu.
>> Add password option which allows you to use vncpasswd auth by xl.
>
> How does the new qemu actually find out what the password is ? AFAICT
> from the current code, it is only written to xenstore.
Yes, it is only writen to xenstore for new qemu
> Does the new qemu read it from there like the old one ?
New qemu hasn't implemented it yet, but I have send a patch named
[xen-upstream-qemu: get vncpassword through xenstore, enable
VNC_AUTH_VNC] [http://patchwork.ozlabs.org/patch/92372/] to this
mail-list before which was cced to you.
That patch allows to read vncpasswd through xenstore in new qemu.
In the discussion, Stefano Stabellini suggest to use QMP to
communicate vncpasswd.
Thanks,
> Ian.
>
--
Zhou Peng
Operating System Technology Group
Institute of Software, the Chinese Academy of Sciences (ISCAS)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-05-10 11:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-20 6:30 [PATCH] tools/libxl: prepare vnc options for dm_args in libxl__build_device_model_args_new ZhouPeng
2011-04-20 12:10 ` Stefano Stabellini
2011-04-21 1:35 ` ZhouPeng
2011-05-09 12:30 ` Ian Jackson
2011-05-10 11:32 ` ZhouPeng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).