Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Significant remote file system improvements #1449

Merged
merged 2 commits into from Dec 13, 2019

Conversation

matt335672
Copy link
Member

  • Reimplemented inode store in separate module chansrv_xfs.[hc]
  • Allowed atimes and mtimes to be written to Windows side
  • Mapped directory/file user write bit to (inverted) Windows FILE_ATTRIBUTE_READONLY bit
  • Mapped file user execute bit to Windows FILE_ATTRIBUTE_SYSTEM bit
  • Implemented improved security for remotely mounted drives (see man sesman.ini)
  • Implemented USB device removal, allowing hot-plug/remove of memory sticks
  • Fixed pagefile.sys (etc) breaking Ubuntu file browser
  • Fixed write offset bug
  • Allowed renaming of open files
  • Improved reported error codes
  • Fixed various memory leaks
  • Removed hardcoded buffer sizes where appropriate
  • Addressed valgrind/memcheck errors related to struct fuse_file_info pointers.

This improves the remote filesystem support to a point where it can even be used to support an XRDP build, although it is necessary to disable PAM support for this, as instfiles/pam.d/mkpamrules creates a soft-link which isn't supported. I used the following commands on an Ubuntu 18.04 LTS system with the XRDP 0.9.11 release tarball:-

cd ~/thinclient_drives/C\:/Users/mjb/Documents/
tar xf ~/xrdp-0.9.11.tar.gz
cd xrdp-0.9.11
./configure --enable-pixman --enable-fuse --disable-pam
make

There are a lot of code changes here. I've tried to simplify the code where possible to make it easier to follow. A lot of private stuff has been moved out of devredir.h into other places. primarily the new includes ms-erref.h, ms-fscc.h, ms-rdpefs.h and ms-smb2.h. The separate inode store in chansrv_xfs.c is significantly faster than the previous inode store, and removes a lot of complications from the code paths in chansrv_fuse.c.

- Reimplemented inode store in separate module chansrv_xfs.[hc]
- Allowed atimes and mtimes to be written to Windows side
- Mapped file user write bit to (inverted) Windows FILE_ATTRIBUTE_READONLY bit
- Mapped file user execute bit to Windows FILE_ATTRIBUTE_SYSTEM bit
- Implemented improved security for remotely mounted drives
- Implemented USB device removal, allowing hot-plug/remove of memory sticks
- Fixed pagefile.sys breaking Ubuntu file browser
- Fixed write offset bug
- Allowed renaming of open files
- Improved reported error codes
- Fixed various memory leaks
- Addressed valgrind errors related to struct fuse_file_info pointers.
@metalefty metalefty added this to the v0.9.12 milestone Dec 9, 2019
@metalefty
Copy link
Member

Brilliant! You really make lots of contributions on drive redirection. I trust your QA. Let's ship it to the next v0.9.12 release.

@matt335672
Copy link
Member Author

Thanks for vote of confidence!

I've got a question for you. I've created four new includes ms-erref.h, ms-fscc.h, ms-rdpefs.h and ms-smb2.h in the chansrv directory containing definitions from the relevant MS docs. I did this to remove unnecessary definitions from devredir.h.

These includes could be merged with common/xrdp_constants.h, or alternatively some of the constants in common/xrdp_constants.h could be moved out to new files common/ms-rdpbcgr.h and common/ms-rdpegdi.h to slim it down a bit. It's just a bit of tidying up.

Let me know which you prefer and I'll put a separate PR together after Xmas.

@metalefty
Copy link
Member

The latter plan sounds tidy and clear which constants come from which MS document for me.
+1 to the latter.

@metalefty metalefty merged commit 93da7c0 into neutrinolabs:devel Dec 13, 2019
@matt335672 matt335672 deleted the filesys-reimplement branch December 30, 2019 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants