[ 
https://issues.apache.org/jira/browse/GUACAMOLE-1641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17574898#comment-17574898
 ] 

Mike Beynon commented on GUACAMOLE-1641:
----------------------------------------

[~vnick] thank you for the suggestions.

Regarding the username password prompting, I added the code and call just after 
the guac_vnc_client_thread is started.  The problem is it works intermittently, 
which indicates some kind of data race with the 
guac_client_owner_supports_required() call returning true only sometimes.  It 
looks like the guac protocol version is grabbed off the first response packet 
and saved.  The problem seems to be there's no explicit synchronization for the 
test of its value and thus no memory barrier so the new thread sees the updated 
value (even if it arrived earlier than the test).

Here's the call to my new auth fcn:
[https://github.com/mbeynon/guacamole-server/blob/vm-server-consoles/src/protocols/vnc/vnc.c#L364]



I had to disable the guac_client_owner_supports_required() call to make it work:

[https://github.com/mbeynon/guacamole-server/blob/vm-server-consoles/src/protocols/vnc/auth.c#L130]

What's the right way to ensure the value is safely testable so early on?

> Add vSphere support to VNC protocol
> -----------------------------------
>
>                 Key: GUACAMOLE-1641
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-1641
>             Project: Guacamole
>          Issue Type: Improvement
>          Components: guacamole
>            Reporter: Mike Beynon
>            Priority: Minor
>
> vSphere bundles a VNC server into their ESXi hypervisor, and tunnels the VNC 
> protocol over a web socket to their client.  I'm working now to add support 
> to guacd to (1) take a vm object id name, (2) use the vSphere API to 
> establish a session with vCenter and request a webmks ticket, and (3) have 
> guacd connect to the appropriate ESXi server and port to setup the websocket 
> and then pass binary frames containing the VNC protocol.  The new parameters 
> for the guacd protocol will mean there's changes to guacamole-client also for 
> the webapp and the db storage for connection parameters.
> I plan to do this on the open source version.
> It's related to GUACAMOLE-591, except it will not show the entire VM catalog. 
>  Instead my changes will provide the mechanism in guacd, and later work can 
> add the catalog.
> Any suggestions how to proceed?  Things to do or things to avoid doing?
> Should I start with the latest apache or glyptodon source?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to