Stephen Dowdy wrote, On 01/06/2011 09:03 AM:
> disk_query_directory: class=1 id=23 init=1

This Works For Me (TM)

I glanced at the MSDN descriptions for
    FileBothDirectoryInformation(), [class=3]
    FileFullDirectoryInformation(), [class=2]
and the missing
    FileDirectoryInformation() [class=1]
(caught by freerdp's
channels/rdpdr/disk/disk_main.c:disk_query_directory()' "default"
case, which returns a RD_STATUS_NOT_SUPPORTED, which appears to
break/disable the \\tsclient redirection.)

and replicated the code there for FileBothDirectoryInformation
making it applicable for FileDirectoryInformation(), as it is
a proper subset.  *WHY* the Windows server has to make multiple
calls using virtually identical filestat calls i dunno, but
whatever...

So, i could be missing something here, but again it seems to
work for me.

Can someone who knows what they're doing vet this and get it in
the freerdp repository? thanks.

diff -Naur freerdp-0.8.2/channels/rdpdr/disk/disk_main.c 
freerdp-0.8.2-sdowdy/channels/rdpdr/disk/disk_main.c
--- freerdp-0.8.2/channels/rdpdr/disk/disk_main.c       2010-11-08 
21:36:30.000000000 -0700
+++ freerdp-0.8.2-sdowdy/channels/rdpdr/disk/disk_main.c        2011-01-06 
11:00:54.000000000 -0700
@@ -828,6 +828,27 @@

        switch (irp->infoClass)
        {
+
+               case FileDirectoryInformation:
+                       size = 64 + strlen(pdirent->d_name) * 2;
+                       buf = malloc(size);
+                       memset(buf, 0, size);
+
+                       SET_UINT32(buf, 0, 0); /* NextEntryOffset [4]*/
+                       SET_UINT32(buf, 4, 0); /* FileIndex [4]*/
+                       SET_UINT64(buf, 8, get_rdp_filetime(file_stat.st_ctime 
< file_stat.st_mtime ?
+                               file_stat.st_ctime : file_stat.st_mtime)); /* 
CreationTime [8]*/
+                       SET_UINT64(buf, 16, 
get_rdp_filetime(file_stat.st_atime)); /* LastAccessTime [8] */
+                       SET_UINT64(buf, 24, 
get_rdp_filetime(file_stat.st_mtime)); /* LastWriteTime [8] */
+                       SET_UINT64(buf, 32, 
get_rdp_filetime(file_stat.st_ctime)); /* ChangeTime [8] */
+                       SET_UINT64(buf, 40, file_stat.st_size); /* EndOfFile 
[8] */
+                       SET_UINT64(buf, 48, file_stat.st_size); /* 
AllocationSize [8] */
+                       SET_UINT32(buf, 56, attr); /* FileAttributes [4] */
+                       len = freerdp_set_wstr(buf + 64, size - 64, 
pdirent->d_name, strlen(pdirent->d_name));
+                       SET_UINT32(buf, 60, len); /* FileNameLength */
+                       size = 64 + len;
+                       break;
+
                case FileBothDirectoryInformation:
                        size = 93 + strlen(pdirent->d_name) * 2;
                        buf = malloc(size);
diff -Naur freerdp-0.8.2/.version freerdp-0.8.2-sdowdy/.version
--- freerdp-0.8.2/.version      1969-12-31 17:00:00.000000000 -0700
+++ freerdp-0.8.2-sdowdy/.version       2010-11-15 18:29:51.000000000 -0700
@@ -0,0 +1 @@
+0.8.2


--stephen
-- 
Stephen Dowdy  -  Systems Administrator  -  NCAR/RAL
303.497.2869   -  [email protected]        -  http://www.ral.ucar.edu/~sdowdy/


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Freerdp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to