Skip to content

fix: fallback to stat handler when unix.Access fails for virtual file…#1319

Open
amjadjibon wants to merge 1 commit intomvdan:masterfrom
amjadjibon:fix/access-handler-virtual-fs
Open

fix: fallback to stat handler when unix.Access fails for virtual file…#1319
amjadjibon wants to merge 1 commit intomvdan:masterfrom
amjadjibon:fix/access-handler-virtual-fs

Conversation

@amjadjibon
Copy link
Copy Markdown

@amjadjibon amjadjibon commented Apr 6, 2026

Copy link
Copy Markdown
Owner

@mvdan mvdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback logic doesn't seem right. As the TODO says, we need this logic to unconditionally use a handler, rather than use a mix of the real OS and a handler. If we mix both, then the sandboxing is entirely pointless still.

@amjadjibon
Copy link
Copy Markdown
Author

The fallback logic doesn't seem right. As the TODO says, we need this logic to unconditionally use a handler, rather than use a mix of the real OS and a handler. If we mix both, then the sandboxing is entirely pointless still.

Hi, I'm looking at your feedback about the access handler fallback logic mixing real OS calls with handler calls.

I'm wondering if adding a new AccessHandlerFunc to the handler interface (similar to StatHandlerFunc, OpenHandlerFunc, etc.) would be the right approach here? This would let users provide custom access handlers for virtual filesystems, similar to how they can already provide custom stat and open handlers.

Or would you prefer a different direction? The TODO mentions v4, so I want to make sure I'm heading in the right direction before proceeding.

Thanks!

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.

2 participants