mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-04 04:25:45 +00:00
vmm: seccomp: rename Thread::Api
to Thread::HttpApi
Signed-off-by: Omer Faruk Bayram <omer.faruk@sartura.hr>
This commit is contained in:
parent
f00df25d40
commit
f2c813e1cf
@ -284,7 +284,7 @@ fn start_http_thread(
|
|||||||
hypervisor_type: HypervisorType,
|
hypervisor_type: HypervisorType,
|
||||||
) -> Result<thread::JoinHandle<Result<()>>> {
|
) -> Result<thread::JoinHandle<Result<()>>> {
|
||||||
// Retrieve seccomp filter for API thread
|
// Retrieve seccomp filter for API thread
|
||||||
let api_seccomp_filter = get_seccomp_filter(seccomp_action, Thread::Api, hypervisor_type)
|
let api_seccomp_filter = get_seccomp_filter(seccomp_action, Thread::HttpApi, hypervisor_type)
|
||||||
.map_err(VmmError::CreateSeccompFilter)?;
|
.map_err(VmmError::CreateSeccompFilter)?;
|
||||||
|
|
||||||
thread::Builder::new()
|
thread::Builder::new()
|
||||||
|
@ -12,7 +12,7 @@ use seccompiler::{
|
|||||||
use std::convert::TryInto;
|
use std::convert::TryInto;
|
||||||
|
|
||||||
pub enum Thread {
|
pub enum Thread {
|
||||||
Api,
|
HttpApi,
|
||||||
SignalHandler,
|
SignalHandler,
|
||||||
Vcpu,
|
Vcpu,
|
||||||
Vmm,
|
Vmm,
|
||||||
@ -743,9 +743,9 @@ fn vcpu_thread_rules(
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
// The filter containing the white listed syscall rules required by the API to
|
// The filter containing the white listed syscall rules required by the HTTP API to
|
||||||
// function.
|
// function.
|
||||||
fn api_thread_rules() -> Result<Vec<(i64, Vec<SeccompRule>)>, BackendError> {
|
fn http_api_thread_rules() -> Result<Vec<(i64, Vec<SeccompRule>)>, BackendError> {
|
||||||
Ok(vec![
|
Ok(vec![
|
||||||
(libc::SYS_accept4, vec![]),
|
(libc::SYS_accept4, vec![]),
|
||||||
(libc::SYS_brk, vec![]),
|
(libc::SYS_brk, vec![]),
|
||||||
@ -777,7 +777,7 @@ fn get_seccomp_rules(
|
|||||||
hypervisor_type: HypervisorType,
|
hypervisor_type: HypervisorType,
|
||||||
) -> Result<Vec<(i64, Vec<SeccompRule>)>, BackendError> {
|
) -> Result<Vec<(i64, Vec<SeccompRule>)>, BackendError> {
|
||||||
match thread_type {
|
match thread_type {
|
||||||
Thread::Api => Ok(api_thread_rules()?),
|
Thread::HttpApi => Ok(http_api_thread_rules()?),
|
||||||
Thread::SignalHandler => Ok(signal_handler_thread_rules()?),
|
Thread::SignalHandler => Ok(signal_handler_thread_rules()?),
|
||||||
Thread::Vcpu => Ok(vcpu_thread_rules(hypervisor_type)?),
|
Thread::Vcpu => Ok(vcpu_thread_rules(hypervisor_type)?),
|
||||||
Thread::Vmm => Ok(vmm_thread_rules(hypervisor_type)?),
|
Thread::Vmm => Ok(vmm_thread_rules(hypervisor_type)?),
|
||||||
|
Loading…
Reference in New Issue
Block a user