Skip to content

Commit

Permalink
Silence ECANCELED and ENOENT.
Browse files Browse the repository at this point in the history
  • Loading branch information
igankevich committed May 28, 2024
1 parent 7ca5fd0 commit a5ae868
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 58 deletions.
120 changes: 66 additions & 54 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cijail"
version = "0.6.7"
version = "0.6.8"
edition = "2021"
publish = false

Expand Down
2 changes: 0 additions & 2 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ FROM alpine:latest AS alpine
RUN apk add linux-headers

FROM rust:1.76.0
# NB: We need debian stable to have the oldest possible glibc
# otherwise cijail may not work on old distributions.

# Get proper linux headers for libseccomp.
COPY --from=alpine /usr/include /usr/include/alpine
Expand Down
8 changes: 7 additions & 1 deletion src/bin/cijail/tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use cijail::EndpointSet;
use cijail::CIJAIL_ENDPOINTS;
use cijail::CIJAIL_PROXY_PID;
use libc::AT_FDCWD;
use libseccomp::error::SeccompErrno;
use libseccomp::error::SeccompError;
use libseccomp::notify_id_valid;
use libseccomp::ScmpNotifReq;
Expand Down Expand Up @@ -61,7 +62,12 @@ pub(crate) fn main(
&mut mutable_context,
) {
Err(LoopError::Continue(e)) => {
error!("continue after seccomp error: {}", e);
if !matches!(
e.errno(),
Some(SeccompErrno::ECANCELED) | Some(SeccompErrno::ENOENT)
) {
error!("continue after seccomp error: {}", e);
}
}
Err(LoopError::Break(e)) => {
return Err(e);
Expand Down

0 comments on commit a5ae868

Please sign in to comment.