Repository navigation
rm: check directory access on wasi - #16095
Open
eduardomourar wants to merge 1 commit into
Open
eduardomourar wants to merge 1 commit into
eduardomourar wants to merge 1 commit into
Conversation
eduardomourar
force-pushed
the
feat/wasi-rm
branch
4 times, most recently
from
November 5, 2026 14:38
8e28c26 to
3515113
Compare
sylvestre
force-pushed
the
feat/wasi-rm
branch
from
November 7, 2026 18:52
3515113 to
94c0990
Compare
eduardomourar
force-pushed
the
feat/wasi-rm
branch
3 times, most recently
from
November 7, 2026 23:17
231b9f6 to
c0f4883
Compare
|
GNU testsuite comparison: |
eduardomourar
force-pushed
the
feat/wasi-rm
branch
from
November 8, 2026 16:40
c0f4883 to
b5f1ecd
Compare
|
Binary size comparison: |
sylvestre
reviewed
Nov 9, 2026
eduardomourar
force-pushed
the
feat/wasi-rm
branch
from
November 9, 2026 21:52
b5f1ecd to
9b5a845
Compare
sylvestre
force-pushed
the
feat/wasi-rm
branch
from
November 9, 2026 21:57
9b5a845 to
45d84fb
Compare
eduardomourar
force-pushed
the
feat/wasi-rm
branch
3 times, most recently
from
November 15, 2026 18:31
9e2390d to
853e617
Compare
Contributor
|
thanks for working on this! |
eduardomourar
force-pushed
the
feat/wasi-rm
branch
2 times, most recently
from
November 16, 2026 00:21
37a1a14 to
f58b7a9
Compare
Contributor
Author
|
@sylvestre, I have simplified WASI |
sylvestre
reviewed
Nov 17, 2026
eduardomourar
force-pushed
the
feat/wasi-rm
branch
from
November 17, 2026 15:31
f58b7a9 to
9a6c09e
Compare
sylvestre
force-pushed
the
feat/wasi-rm
branch
2 times, most recently
from
November 19, 2026 09:28
56f76e7 to
c2c77ac
Compare
eduardomourar
force-pushed
the
feat/wasi-rm
branch
from
November 19, 2026 22:01
c2c77ac to
d83203c
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WASI has no permission bits, so rm's readability and writability checks need a different implementation, and a few syscalls behave differently than on Unix: path_remove_directory rejects a trailing slash, and the sandbox's preopened directory can resolve to the same (dev, ino) as root.
Add a WASI is_readable that probes with read_dir instead of PermissionsExt, and a WASI handle_writable_directory that uses it. Trim trailing slash bytes before remove_dir on WASI. Move the "." / ".." check before the root check so it also runs for sandbox paths that would otherwise look like root, or fail to stat at all.
Enable test_rm in the WASI test runner, and mark the tests that still can't run under WASI with wasi_ignore.