Skip to content

Sharing 3/8: add confined read-only dirfs - #38

Merged
zackees merged 2 commits into
mainfrom
feat/issue-29-readonly-dirfs
Oct 18, 2026
Merged

zackees merged 2 commits into
mainfrom
feat/issue-29-readonly-dirfs

Conversation

@zackees

@zackees zackees commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Closes #29

Adds a read-only FUSE passthrough filesystem for a selected host folder. Lookups walk from an open root directory descriptor using O_NOFOLLOW for every component. Only regular files and directories are visible; symlinks, devices, FIFOs and sockets are hidden. Reads stream through open file handles, and the mount is owner-only with ro,nodev,nosuid,noexec.

Verification:

  • nix build .#docker-vm -o /tmp/docker-vm-issue-29-result passed, including new unit tests for listing, reads, symlink and .. refusal, and read-only behavior.
  • Mounted the staged dirfs.rs implementation from a temporary Rust harness into a running private-Xvfb viewer session's drop zone. docker exec read docs/hello.txt through /home/desktop/mnt/docs; an outside-pointing symlink was absent; creating a file returned Read-only file system.
  • findmnt inside the container reported fuse.dir ro,nosuid,nodev,noexec with the session UID and GID. Unmount made the file disappear, and the exact test viewer PID was stopped with its container and mount directory removed.

The native File menu will call this mount API on a worker thread in #32. Writable operations remain for #30.

CI follow-up: updated the existing tests/validation.sh static bind check for the tiered formatter introduced in #28. ./tests/validation.sh now passes locally (19 JavaScript and 3 Python tests, plus compose validation).

@zackees
zackees merged commit ab8d773 into main Oct 18, 2026
1 check passed
@zackees
zackees deleted the feat/issue-29-readonly-dirfs branch October 18, 2026 00:39
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.

Sharing 3/8: dirfs - read-only passthrough FUSE confined to its root

1 participant