mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
main: rename landlock_config to landlock_rules
To keep the naming consistent, rename all uses of landlock_config to landlock_rules. Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
This commit is contained in:
committed by
Bo Chen
parent
b9f086bcb3
commit
bd180bc3eb
@@ -798,7 +798,7 @@ pub struct VmConfig {
|
||||
pub preserved_fds: Option<Vec<i32>>,
|
||||
#[serde(default)]
|
||||
pub landlock_enable: bool,
|
||||
pub landlock_config: Option<Vec<LandlockConfig>>,
|
||||
pub landlock_rules: Option<Vec<LandlockConfig>>,
|
||||
}
|
||||
|
||||
impl VmConfig {
|
||||
@@ -876,9 +876,9 @@ impl VmConfig {
|
||||
landlock.add_rule_with_access("/dev/net/tun".into(), "rw")?;
|
||||
}
|
||||
|
||||
if let Some(landlock_configs) = &self.landlock_config {
|
||||
for landlock_config in landlock_configs.iter() {
|
||||
landlock_config.apply_landlock(&mut landlock)?;
|
||||
if let Some(landlock_rules) = &self.landlock_rules {
|
||||
for landlock_rule in landlock_rules.iter() {
|
||||
landlock_rule.apply_landlock(&mut landlock)?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user