Skip to content

Add AccessHandler to handler file permissions#1319

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

Add AccessHandler to handler file permissions#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!

@amjadjibon amjadjibon marked this pull request as draft April 9, 2026 06:55
@amjadjibon amjadjibon force-pushed the fix/access-handler-virtual-fs branch from 18d6e68 to dfe0444 Compare April 9, 2026 06:56
@amjadjibon amjadjibon force-pushed the fix/access-handler-virtual-fs branch from dfe0444 to 6354465 Compare April 9, 2026 06:59
@amjadjibon amjadjibon changed the title fix: fallback to stat handler when unix.Access fails for virtual file… Add AccessHandler to handler file permissions Apr 9, 2026
@amjadjibon amjadjibon requested a review from mvdan April 9, 2026 16:17
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