mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-12 07:32:56 +00:00
vmm: Limit the visibility of Landlock objects
Limit the visibility of objects and methods introduced by Landlock implementation. Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
This commit is contained in:
parent
457fd9ef96
commit
7f6731cd05
vmm/src
@ -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<AccessFs>,
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ impl Landlock {
|
||||
Ok(Landlock { ruleset })
|
||||
}
|
||||
|
||||
pub fn add_rule(
|
||||
pub(crate) fn add_rule(
|
||||
&mut self,
|
||||
path: PathBuf,
|
||||
access: BitFlags<AccessFs>,
|
||||
@ -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,
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user