MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / add_rule_with_access

Method add_rule_with_access

vmm/src/landlock.rs:107–114  ·  view source on GitHub ↗
(
        &mut self,
        path: &Path,
        access: &str,
    )

Source from the content-addressed store, hash-verified

105 }
106
107 pub(crate) fn add_rule_with_access(
108 &mut self,
109 path: &Path,
110 access: &str,
111 ) -> Result<(), LandlockError> {
112 self.add_rule(path, LandlockAccess::try_from(access)?.access)?;
113 Ok(())
114 }
115
116 pub fn restrict_self(self) -> Result<(), LandlockError> {
117 self.ruleset

Callers 1

apply_landlockMethod · 0.80

Calls 1

add_ruleMethod · 0.80

Tested by

no test coverage detected