<html><body>
<p><font size="2" face="sans-serif">We can get permission ot submit patches back against another project (spice - which we may have via some other permissions) and then use that library...</font><br>
<font size="2" face="sans-serif"><br>
<br>
Cheers,<br>
Frank <br>
<br>
-----------------------------------------------------------------------------------------------------------------------<br>
Frank Novak ( ŵ·« nu¨°¡¢f¨¡n )<br>
STSM, SCEM Open Hypervisor<br>
IBM Linux Technology Center<br>
US: fnovak@us.ibm.com ; Notes: Frank Novak/Watson/IBM @IBMUS<br>
cell : 919-671-7966<br>
-------------------------------------------------------------------------------------------------------------------------</font><br>
<br>
<img width="16" height="16" src="cid:1__=0ABBF7B9DFF1F4A88f9e8a93df938@us.ibm.com" border="0" alt="Inactive hide details for Aline Manera ---08/04/2014 01:35:03 PM---I think we will have license issues with this patch set: htt"><font size="2" color="#424282" face="sans-serif">Aline Manera ---08/04/2014 01:35:03 PM---I think we will have license issues with this patch set: <a href="http://stackoverflow.com/questions/1174240/">http://stackoverflow.com/questions/1174240/</a></font><br>
<br>
<font size="1" color="#5F5F5F" face="sans-serif">From:        </font><font size="1" face="sans-serif">Aline Manera <alinefm@linux.vnet.ibm.com></font><br>
<font size="1" color="#5F5F5F" face="sans-serif">To:        </font><font size="1" face="sans-serif">shaohef@linux.vnet.ibm.com, kimchi-devel@ovirt.org, Frank Novak/Watson/IBM@IBMUS, Leonardo Garcia <lagarcia@br.ibm.com></font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Date:        </font><font size="1" face="sans-serif">08/04/2014 01:35 PM</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Subject:        </font><font size="1" face="sans-serif">Re: [Kimchi-devel] [PATCH] set the password for spice and VNC page.</font><br>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<tt><font size="2"><br>
I think we will have license issues with this patch set:<br>
<br>
</font></tt><tt><font size="2"><a href="http://stackoverflow.com/questions/1174240/apache-and-lgpl-license-compatibility">http://stackoverflow.com/questions/1174240/apache-and-lgpl-license-compatibility</a></font></tt><tt><font size="2"> <br>
<br>
<br>
Here you are modifying files imported from noVNC and Spice communities.<br>
noVNC is under MPL 2.0 and Spice under LGPLv3 and everything under ui/ <br>
is Apache 2.0 according to Kimchi.<br>
<br>
From the link above, we can only USE imported LGPLv3 code with Apache <br>
license, ie, we can not modify them otherwise we need to re-license the <br>
project under LGPLv3<br>
<br>
On 08/04/2014 11:48 AM, shaohef@linux.vnet.ibm.com wrote:<br>
> From: ShaoHe Feng <shaohef@linux.vnet.ibm.com><br>
><br>
> set a cookie to store the ticket before connect a VM.<br>
> get the password from cookie and pass it to spice and VNC server.<br>
><br>
> Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com><br>
> ---<br>
> ui/js/novnc/main.js | 10 +++++++++-<br>
> ui/js/src/kimchi.guest_main.js | 22 ++++++++++++++++------<br>
> ui/pages/spice.html.tmpl | 10 +++++++++-<br>
> 3 files changed, 34 insertions(+), 8 deletions(-)<br>
><br>
> diff --git a/ui/js/novnc/main.js b/ui/js/novnc/main.js<br>
> index 22037ec..84a813b 100644<br>
> --- a/ui/js/novnc/main.js<br>
> +++ b/ui/js/novnc/main.js<br>
> @@ -79,7 +79,15 @@ if (token) {<br>
> WebUtil.createCookie('token', token, 1)<br>
> }<br>
><br>
> -password = WebUtil.getQueryVar('password', '');<br>
> +// password = WebUtil.getQueryVar('password', '');<br>
> +var cookieRe = new RegExp(';?\\\s*(ticketVM)=(\s*[^;]*);?', 'g');<br>
> +var match = cookieRe.exec(document.cookie);<br>
> +var password = match ? decodeURIComponent(match[2]) : '';<br>
> +if (match) {<br>
> + var utcString = new Date().toUTCString();<br>
> + document.cookie = 'ticketVM' + '=; expires=' + utcString;<br>
> +}<br>
> +<br>
> path = WebUtil.getQueryVar('path', 'websockify');<br>
><br>
> if ((!host) || (!port)) {<br>
> diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js<br>
> index ff6f2e1..1c1428f 100644<br>
> --- a/ui/js/src/kimchi.guest_main.js<br>
> +++ b/ui/js/src/kimchi.guest_main.js<br>
> @@ -150,12 +150,22 @@ kimchi.vmedit = function(event) {<br>
> kimchi.openVmConsole = function(event) {<br>
> var vm=$(this).closest('li[name=guest]');<br>
> var vmObject=vm.data();<br>
> - if (vmObject.graphics['type'] == 'vnc') {<br>
> - kimchi.vncToVM(vm.attr('id'));<br>
> - }<br>
> - else if (vmObject.graphics['type'] == 'spice') {<br>
> - kimchi.spiceToVM(vm.attr('id'));<br>
> - }<br>
> + kimchi.retrieveVM(vm.attr('id'), function(result) {<br>
> + if (result.ticket.expire && result.ticket.expire < 0) {<br>
> + kimchi.message.error('please reset your password!');<br>
> + return;<br>
> + }<br>
> + result.ticket.passwd != null && kimchi.cookie.set("ticketVM", result.ticket.passwd, 100);<br>
> + if (vmObject.graphics['type'] == 'vnc') {<br>
> + kimchi.vncToVM(vm.attr('id'));<br>
> + }<br>
> + else if (vmObject.graphics['type'] == 'spice') {<br>
> + kimchi.spiceToVM(vm.attr('id'));<br>
> + }<br>
> + }, function(err) {<br>
> + kimchi.message.error(err.responseJSON.reason);<br>
> + }<br>
> + );<br>
><br>
> };<br>
><br>
> diff --git a/ui/pages/spice.html.tmpl b/ui/pages/spice.html.tmpl<br>
> index 213d216..cb7c331 100644<br>
> --- a/ui/pages/spice.html.tmpl<br>
> +++ b/ui/pages/spice.html.tmpl<br>
> @@ -64,6 +64,14 @@<br>
> host = getParameter("listen");<br>
> port = getParameter("port");<br>
> token = getParameter("token");<br>
> + var cookieRe = new RegExp(';?\\\s*(ticketVM)=(\s*[^;]*);?', 'g');<br>
> + var match = cookieRe.exec(document.cookie);<br>
> + password = match ? decodeURIComponent(match[2]) : '';<br>
> + if (match) {<br>
> + var utcString = new Date().toUTCString();<br>
> + document.cookie = 'ticketVM' + '=; expires=' + utcString;<br>
> + }<br>
> +<br>
> document.getElementById("host").value = host;<br>
> document.getElementById("port").value = port;<br>
> if ((!host) || (!port)) {<br>
> @@ -82,7 +90,7 @@<br>
> screen_id : "spice-screen",<br>
> dump_id : "debug-div",<br>
> message_id : "message-div",<br>
> - password : "",<br>
> + password : password,<br>
> onerror : spice_error<br>
> });<br>
> } catch (e) {<br>
<br>
</font></tt><br>
</body></html>