mirror of
https://github.com/containers/youki
synced 2024-11-23 17:32:15 +01:00
small improvement.
This commit is contained in:
parent
9ed52d9b57
commit
0d73ff2182
@ -311,8 +311,8 @@ pub fn container_init_process(
|
|||||||
// Without no new privileges, seccomp is a privileged operation. We have to
|
// Without no new privileges, seccomp is a privileged operation. We have to
|
||||||
// do this before dropping capabilities. Otherwise, we should do it later,
|
// do this before dropping capabilities. Otherwise, we should do it later,
|
||||||
// as close to exec as possible.
|
// as close to exec as possible.
|
||||||
if linux.seccomp().is_some() && proc.no_new_privileges().is_none() {
|
if let Some(seccomp) = linux.seccomp() {
|
||||||
if let Some(seccomp) = linux.seccomp() {
|
if proc.no_new_privileges().is_none() {
|
||||||
let notify_fd =
|
let notify_fd =
|
||||||
seccomp::initialize_seccomp(seccomp).context("failed to execute seccomp")?;
|
seccomp::initialize_seccomp(seccomp).context("failed to execute seccomp")?;
|
||||||
sync_seccomp(notify_fd, main_sender, init_receiver)
|
sync_seccomp(notify_fd, main_sender, init_receiver)
|
||||||
|
Loading…
Reference in New Issue
Block a user