diff --git a/vmm/src/landlock.rs b/vmm/src/landlock.rs index 0783a16bc..3354bfdda 100644 --- a/vmm/src/landlock.rs +++ b/vmm/src/landlock.rs @@ -35,7 +35,7 @@ pub enum LandlockError { // https://docs.rs/landlock/latest/landlock/enum.ABI.html for more info on ABI static ABI: ABI = ABI::V3; -pub struct LandlockAccess { +pub(crate) struct LandlockAccess { access: BitFlags, } @@ -83,7 +83,7 @@ impl Landlock { Ok(Landlock { ruleset }) } - pub fn add_rule( + pub(crate) fn add_rule( &mut self, path: PathBuf, access: BitFlags, @@ -100,7 +100,7 @@ impl Landlock { Ok(()) } - pub fn add_rule_with_access( + pub(crate) fn add_rule_with_access( &mut self, path: PathBuf, access: &str, diff --git a/vmm/src/vm_config.rs b/vmm/src/vm_config.rs index de3cb007c..51de9af05 100644 --- a/vmm/src/vm_config.rs +++ b/vmm/src/vm_config.rs @@ -802,7 +802,7 @@ pub struct VmConfig { } impl VmConfig { - pub fn apply_landlock(&self) -> LandlockResult<()> { + pub(crate) fn apply_landlock(&self) -> LandlockResult<()> { let mut landlock = Landlock::new()?; if let Some(mem_zones) = &self.memory.zones {