mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices, vmm: Move to the seccompiler crate
Fixes: #2929 Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
@@ -38,7 +38,7 @@ use crate::{
|
||||
VIRTIO_F_IN_ORDER, VIRTIO_F_IOMMU_PLATFORM, VIRTIO_F_VERSION_1,
|
||||
};
|
||||
use byteorder::{ByteOrder, LittleEndian};
|
||||
use seccomp::{SeccompAction, SeccompFilter};
|
||||
use seccompiler::{apply_filter, SeccompAction};
|
||||
use std::io;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use std::path::PathBuf;
|
||||
@@ -441,7 +441,7 @@ where
|
||||
thread::Builder::new()
|
||||
.name(self.id.clone())
|
||||
.spawn(move || {
|
||||
if let Err(e) = SeccompFilter::apply(virtio_vsock_seccomp_filter) {
|
||||
if let Err(e) = apply_filter(&virtio_vsock_seccomp_filter) {
|
||||
error!("Error applying seccomp filter: {:?}", e);
|
||||
} else if let Err(e) = handler.run(paused, paused_sync.unwrap()) {
|
||||
error!("Error running worker: {:?}", e);
|
||||
|
||||
@@ -274,7 +274,7 @@ mod tests {
|
||||
PathBuf::from("/test/sock"),
|
||||
TestBackend::new(),
|
||||
false,
|
||||
seccomp::SeccompAction::Trap,
|
||||
seccompiler::SeccompAction::Trap,
|
||||
)
|
||||
.unwrap(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user