extension_host: Refactor capability checks (#35139)
This PR refactors the extension capability checks to be centralized in the `CapabilityGranter`. Release Notes: - N/A
This commit is contained in:
parent
290f84a9e1
commit
d7b403e981
6 changed files with 193 additions and 41 deletions
|
@ -847,7 +847,8 @@ impl process::Host for WasmState {
|
|||
command: process::Command,
|
||||
) -> wasmtime::Result<Result<process::Output, String>> {
|
||||
maybe!(async {
|
||||
self.manifest.allow_exec(&command.command, &command.args)?;
|
||||
self.capability_granter
|
||||
.grant_exec(&command.command, &command.args)?;
|
||||
|
||||
let output = util::command::new_smol_command(command.command.as_str())
|
||||
.args(&command.args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue