FreeRDP/FreeRDP — pull request #2072 by nfedera (2014-09-02 13:45:14+00:00)
Title: rdpdr/drive: fixes for hung peers & info requests

drive_file_init: only allow directories and regular files
This is fixes issue #2071

Even if the server is only interested in getting a file's or directory's attributes FreeRDP still tries to open the object with read permissions.
If the FreeRDP client has no read permissions for this object the call will fail which forces the server to perform some expensive workarounds (e.g. getting to the stat buffers via a directory enumeration request).

On Linux we can try to open the file or directory with the O_PATH flag in order to obtain a file descriptor who's only purpose is to perform operations that act purely at the file descriptor level.