Skip to content

Commit

Permalink
vmm: enable landlock in restore path
Browse files Browse the repository at this point in the history
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
  • Loading branch information
praveen-pk committed Mar 8, 2024
1 parent 797359b commit 5bcbabb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions vmm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,18 @@ impl RequestHandler for Vmm {
)?;
self.vm = Some(vm);

if self
.vm_config
.as_ref()
.unwrap()
.lock()
.unwrap()
.landlock_enable
{
apply_landlock(self.vm_config.as_ref().unwrap().clone())
.map_err(VmError::ApplyLandlock)?;
}

// Now we can restore the rest of the VM.
if let Some(ref mut vm) = self.vm {
vm.restore()
Expand Down

0 comments on commit 5bcbabb

Please sign in to comment.