vmm: Introduce ApplyLandlock trait

Introduce ApplyLandlock trait and add implementations to VmConfig
elements with PathBufs. This trait adds config specific rules to
landlock ruleset.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
This commit is contained in:
Praveen K Paladugu
2024-02-22 20:40:45 +00:00
committed by Liu Wei
parent 1dd53c3d24
commit b3e5738b40
2 changed files with 237 additions and 1 deletions
+4
View File
@@ -26,6 +26,10 @@ pub enum LandlockError {
/// Invalid Landlock access
#[error("Invalid Landlock access: {0}")]
InvalidLandlockAccess(String),
/// Invalid Path
#[error("Invalid path")]
InvalidPath,
}
// https://docs.rs/landlock/latest/landlock/enum.ABI.html for more info on ABI