Skip to content

Fix std::fs::File::metadata permission on WASI target #74972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2020
Merged

Fix std::fs::File::metadata permission on WASI target #74972

merged 1 commit into from
Aug 2, 2020

Conversation

ibmibmibm
Copy link
Contributor

Previously std::fs::File::metadata on wasm32-wasi would call fd_filestat_get
to get metadata associated with fd, but that fd is opened without
RIGHTS_FD_FILESTAT_GET right, so it will failed on correctly implemented WASI
environment.

This change instead to add the missing rights when opening an fd.

Previously `std::fs::File::metadata` on wasm32-wasi would call `fd_filestat_get`
to get metadata associated with fd, but that fd is opened without
RIGHTS_FD_FILESTAT_GET right, so it will failed on correctly implemented WASI
environment.

This change instead to add the missing rights when opening an fd.
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @KodrAus (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 31, 2020
@KodrAus
Copy link
Contributor

KodrAus commented Aug 2, 2020

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 2, 2020

📌 Commit 4c85179 has been approved by KodrAus

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 2, 2020
@bors
Copy link
Collaborator

bors commented Aug 2, 2020

⌛ Testing commit 4c85179 with merge 1e99138...

@bors
Copy link
Collaborator

bors commented Aug 2, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: KodrAus
Pushing 1e99138 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 2, 2020
@bors bors merged commit 1e99138 into rust-lang:master Aug 2, 2020
@ibmibmibm ibmibmibm deleted the wasi-right-fix branch August 3, 2020 08:19
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants