-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat(runtime): Allow embedders to perform additional access checks on file open #23208
Conversation
5a0104d
to
09b355e
Compare
d3cb8cf
to
dc74c8c
Compare
dc74c8c
to
806bf4f
Compare
…into combine_read_write
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, reviewed offline with Matt. There's follow up work to be done, but this is more than good enough for a first pass.
pub fn check_was_allow_all_flag_passed(&mut self) -> Result<(), AnyError> { | ||
self.0.lock().all.check() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to have a unit test for this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this to a follow-up.
Embedders may have special requirements around file opening, so we add a new
check_open
permission check that is called as part of the file open process.