Use ENOENT rather than ENOTCAPABLE for missing preopens.#370
Merged
sunfishcode merged 1 commit intomainfrom Dec 21, 2022
Merged
Use ENOENT rather than ENOTCAPABLE for missing preopens.#370sunfishcode merged 1 commit intomainfrom
ENOENT rather than ENOTCAPABLE for missing preopens.#370sunfishcode merged 1 commit intomainfrom
Conversation
When a user calls `open` with a path that does not have a corresponding preopen, set errno to `ENOENT` rather than `ENOTCAPABLE`. This conceptually represents an attempt to open a path which has not been provided within the sandbox, so it's more accurately represented as "not present" rather than "insufficient capabilities".
abrown
approved these changes
Dec 21, 2022
loganek
approved these changes
Dec 21, 2022
sunfishcode
added a commit
to WebAssembly/wasi-sdk
that referenced
this pull request
Jan 9, 2023
Update to wasi-libc a1c7c2c7a4b2813c6f67bd2ef6e0f430d31cebad - Don't use sbrk(0) to determine the initial heap size (WebAssembly/wasi-libc#377) - Fix more headers to avoid depending on `max_align_t` (WebAssembly/wasi-libc#375) - Use `ENOENT` rather than `ENOTCAPABLE` for missing preopens. (WebAssembly/wasi-libc#370) - Adjust Makefile for LLVM trunk (16) as of 2022-11-08 (WebAssembly/wasi-libc#344)
jedisct1
added a commit
to jedisct1/zig
that referenced
this pull request
Jan 9, 2023
Some notable changes: - `ENOENT` is returned instead of `ENOTCAPABLE` when a path has not be pre-opened (WebAssembly/wasi-libc#370) - `fd_readdir()`: some implementations may not set the inode number, so an additional call to `fstatat()` is now done in order to get it when that happens.
sunfishcode
added a commit
to WebAssembly/wasi-sdk
that referenced
this pull request
Jan 9, 2023
Update to wasi-libc a1c7c2c7a4b2813c6f67bd2ef6e0f430d31cebad - Don't use sbrk(0) to determine the initial heap size (WebAssembly/wasi-libc#377) - Fix more headers to avoid depending on `max_align_t` (WebAssembly/wasi-libc#375) - Use `ENOENT` rather than `ENOTCAPABLE` for missing preopens. (WebAssembly/wasi-libc#370) - Adjust Makefile for LLVM trunk (16) as of 2022-11-08 (WebAssembly/wasi-libc#344)
andrewrk
pushed a commit
to ziglang/zig
that referenced
this pull request
Jan 10, 2023
Some notable changes: - `ENOENT` is returned instead of `ENOTCAPABLE` when a path has not be pre-opened (WebAssembly/wasi-libc#370) - `fd_readdir()`: some implementations may not set the inode number, so an additional call to `fstatat()` is now done in order to get it when that happens.
toyobayashi
added a commit
to toyobayashi/wasm-util
that referenced
this pull request
Feb 18, 2023
john-sharratt
pushed a commit
to john-sharratt/wasix-libc
that referenced
this pull request
Mar 6, 2023
…mbly#370) When a user calls `open` with a path that does not have a corresponding preopen, set errno to `ENOENT` rather than `ENOTCAPABLE`. This conceptually represents an attempt to open a path which has not been provided within the sandbox, so it's more accurately represented as "not present" rather than "insufficient capabilities".
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.
When a user calls
openwith a path that does not have a corresponding preopen, set errno toENOENTrather thanENOTCAPABLE. This conceptually represents an attempt to open a path which has not been provided within the sandbox, so it's more accurately represented as "not present" rather than "insufficient capabilities".Also, this is one step in migrating away from having
ENOTCAPABLEas an error code. It came from CloudABI, but it isn't in POSIX and portable application code isn't expecting it.