Hi Team,

I have done the following changes to fix the above issue which works both in Windows  as well as Linux RDP.

#define GUAC_FILESYSTEM_NAME          "C\0L\0O\0U\0D\0\0\0"

Instead of using above configurations I have used the following  (  No   UTF-16 encoding  is required  ) :-   


and I have used   UTF-16 encoding in the following :-

 guac_rdpdr_send_client_name_request(rdpdr, "Cloud Storage");    


#define GUAC_DRIVE_NAME          "C\0l\0o\0u\0d\0 \0S\0t\0o\0r\0a\0g\0e\0\0\0"

and used the above in the  guac_rdpdr_send_client_name_request function .

Following is the output in the Windows and Linux RDP :- Please refer the screenshots

Thanks Nick for the helping me out .

Please look into it and suggest if there is any change required.

Thanks and regards,
Amarjeet Singh

On Mon, Feb 26, 2018 at 8:27 PM, Nick Couchman <vnick@apache.org> wrote:

It's interesting that XRDP is still clearly attempting to read things as UTF-16 here, but if that's failing for unmodified Guacamole, too, then it must be reading a field which we are not encoding as UTF-16 already (since the name of Guacamole's filesystem is definitely pre-encoded as UTF-16 at the moment). Perhaps we're wrong in the handling of whichever value is being used by XRDP, too?

I'm going to try to stand up a XRDP test server tomorrow and see if I can test a few things and get some findings consistent with Amarjeet's results.  This point actually puzzles me a little bit, particularly since XRDP apparently works fine with xfreerdp, which does not UTF-16 encode its filesystem name parameter.  Maybe with a few more test cases we can find the illusive pattern.

Or we'll just further confuse ourselves ;-).


It looks to me like xrdp just reads the "PreferredDosName" setting and doesn't even bother to try to enumerate the DeviceData:

In my testing, with my changes for GUACAMOLE-446, it doesn't matter what I set the name of the drive to in Guacamole, it always shows up as "GUAC" in the XRDP redirected filesystem directory.  I can't find the exact place in the guacd code where the PreferredDOSName field gets set, but it looks like maybe it just uses the GUAC_OS_TYPE define from rdpdr_messages.h:

??  The PreferredDOSName field is supposed to be ASCII, 8 characters, at most, and *not* null-terminated...

So, whatever changes get made in -446 should *not* adversely impact XRDP, as far as I can tell.  Also, I tested xfreerdp with xrdp, and, when you specify a filesytem name longer than 8 characters, it just truncates it at 8 ("temporary_files" turned into "temporar").  My guess is that xfreerdp is just taking the command line argument for the filesystem name and truncating it to 8 characters for the preferred DOS name.