commit | 91ad5d8a4c93d517232b909adcaf871ccd0047dd | [log] [tgz] |
---|---|---|
author | Brandon Castellano <bcastell@google.com> | Thu Feb 13 16:34:39 2025 -0800 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Feb 13 16:34:39 2025 -0800 |
tree | fec8f6c3a9f9443197478d578b81aa2b2b40a24d | |
parent | 1746ccc797192b7fee99f07375784c12a62a08ce [diff] |
[fxfs] Allow connections with writable rights to verified files Remove restriction on *opening* verified files as writable. This does **not** allow writing or resizing these files however, nor does it allow any kind of operation that mutates the file's data. While adding support in fxfs for the new fuchsia.io Open3 method, we missed a check when opening a file that disallows opening as writable. In practice writes still fail since we mark the handle as read-only. Furthermore in Starnix, we keep handles to files cached, so we already were keeping writable handles around. We enforce writability on handles differently in Starnix as well. Starnix has used Open3, so it effectively bypassed this check for quite some time. We have additional access checks in Starnix that prevent opening a verified file with O_RDWR or O_WRONLY, and additional checks in fxfs that disallow write or resize operations. Test: fx test fuchsia-pkg://fuchsia.com/fxfs-tests#meta/fxfs-platform-test.cm Change-Id: I1d7dae6ffbde889d784c8c9aa8dea18d0d699afb Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1206305 Reviewed-by: Nikita Jindal <nikitajindal@google.com> Commit-Queue: Brandon Castellano <bcastell@google.com>
Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.
We expect everyone interacting with our project to respect our code of conduct.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.