Skip to content

Commit

Permalink
don't warn about seccomp if no_new_privileges is not Some(true)
Browse files Browse the repository at this point in the history
Signed-off-by: Jerome Gravel-Niquet <[email protected]>
  • Loading branch information
jeromegn committed Apr 9, 2024
1 parent f535c45 commit 68973b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/libcontainer/src/process/container_init_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ pub fn container_init_process(
}
}
#[cfg(not(feature = "libseccomp"))]
if proc.no_new_privileges().is_none() {
if proc.no_new_privileges().unwrap_or_default() {
tracing::warn!("seccomp not available, unable to enforce no_new_privileges!")
}

Expand Down Expand Up @@ -621,7 +621,7 @@ pub fn container_init_process(
}
}
#[cfg(not(feature = "libseccomp"))]
if proc.no_new_privileges().is_some() {
if proc.no_new_privileges().unwrap_or_default() {
tracing::warn!("seccomp not available, unable to set seccomp privileges!")
}

Expand Down

0 comments on commit 68973b6

Please sign in to comment.