Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence ECANCELED and ENOENT. #34

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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