mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-09 21:30:07 +00:00
vmm: Enable Landlock in restore path
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
This commit is contained in:
parent
11c17ca319
commit
eea45a2c78
@ -1459,6 +1459,18 @@ impl RequestHandler for Vmm {
|
|||||||
)?;
|
)?;
|
||||||
self.vm = Some(vm);
|
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.
|
// Now we can restore the rest of the VM.
|
||||||
if let Some(ref mut vm) = self.vm {
|
if let Some(ref mut vm) = self.vm {
|
||||||
vm.restore()
|
vm.restore()
|
||||||
|
Loading…
Reference in New Issue
Block a user