Skip to content

Commit

Permalink
support deny all for read/write
Browse files Browse the repository at this point in the history
  • Loading branch information
Joinhack committed Jan 19, 2025
1 parent f57eba5 commit 51b7972
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/wasi-common/src/blockless/permissions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ impl BlsRuntimePermissionsContainer {
let options = config.into();
Permissions::from_options(&*self.inner.descriptor_parser, &options)?
};

if let Some(PermissionGrant::All) = config.deny_read {
permissions.read.flag_denied_global = true;
}
if let Some(PermissionGrant::All) = config.deny_write {
permissions.write.flag_denied_global = true;
}
if let Some(PermissionGrant::All) = config.allow_read {
permissions.read.granted_global = true;
}
Expand Down

0 comments on commit 51b7972

Please sign in to comment.