>
>
>>> >
>>> I think you will run into trouble manually parsing the Guacamole protocol
>>> with a guac_parser in a context where inbound instructions are already
>>> being parsed received. Is this because the FreeRDP authentication
>>> callback
>>> must be synchronous?
>>>
>>>
>> I'm not sure.  On the xfreerdp side of things, this code results in a
>> Password: prompt on the command line, and the xfreerdp app waits until you
>> enter something before proceeding.
>>
>
> Yeah, looks like this is going to be problematic.  Parsing the Guacamole
> protocol while it is already running doesn't seem to work - if I use
> guac_parser_expect(), it fails because there are other things going on in
> the background for the connection and the argv opcode isn't the first thing
> through, so it doesn't get what it's expecting.  I also tried just looping
> on guac_parser_read() and looking at the opcodes as they come across,
> ignoring anything but argv, but it still fails.  This probably means that
> the use of the FreeRDP authentication callback will not work, unless
> there's some other way to accomplish this.  I could still try to block the
> pthread until the input is received, but this might cause other problems on
> the client side with an unresponsive connection?
>
> I could prompt ahead of this, before the RDP connection is actually
> established, but the situations where input are going to be required aren't
> necessarily predictable.  For example, if the server supports either RDP or
> TLS security, then the username and password do not have to be entered in
> order to establish the connection, so it's possible for the connection to
> go to the Windows login screen.  If NLA security is in use, then the
> credentials must be provided prior to the connection being established.
> However, if you have authentication set to "any" (auto-detect), then it's
> hard to know before actually connecting to the server what is going to be
> required.  I could make some assumptions about it (just ask for username
> and password if they aren't provided, assuming they'll be used at some
> point along the way), but maybe there are situations where people actually
> don't want to provide those at all, and don't want to be prompted for it?
>
>
Well, tried moving to the following functions (for RDP) with no joy:
- rdp_freerdp_pre_connect() - Behaves identically to using it in the
authenticate callback, where the prompt is sent to the client and
displayed, but the connection still fails and does not wait for the prompt.
-  guac_rdp_handle_connection() - This gets me even less far along than
putting it in one of the callbacks - now I don't even see the prompt show
up on the client side, and it still fails - doesn't wait, and doesn't seem
to be getting any opcode.  Not sure, but maybe this is too early in the
connection?
- guac_rdp_client_thread() - Same as in the handle connection function - no
required opcode showing up on the client side, and connection just hangs.

Sorry, this is probably incredibly dense of me, but right now just trying
to get one prompt working...

-Nick

Reply via email to