Skip to content

Commit

Permalink
Merge pull request #470 from yihuaf/yihuaf/468
Browse files Browse the repository at this point in the history
enable default error code for seccomp
  • Loading branch information
utam0k authored Nov 13, 2021
2 parents 4318258 + b8adcf6 commit 8cc892a
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 12 deletions.
22 changes: 17 additions & 5 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 crates/integration_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ flate2 = "1.0"
test_framework = { path = "../test_framework"}
anyhow = "1.0"
once_cell = "1.8.0"
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "d6fb1e91742313cd0d0085937e2d6df5d4669720" }
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "54c5e386f01ab37c9305cc4a83404eb157e42440" }
which = "4.2.2"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
4 changes: 2 additions & 2 deletions crates/libcgroups/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ nix = "0.23.0"
procfs = "0.11.0"
log = "0.4"
anyhow = "1.0"
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "d6fb1e91742313cd0d0085937e2d6df5d4669720" }
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "54c5e386f01ab37c9305cc4a83404eb157e42440" }
dbus = "0.9.5"
fixedbitset = "0.4.0"
serde = { version = "1.0", features = ["derive"] }
Expand All @@ -22,7 +22,7 @@ errno = { version = "0.2.8", optional = true }
libc = { version = "0.2.107", optional = true }

[dev-dependencies]
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "d6fb1e91742313cd0d0085937e2d6df5d4669720", features = ["proptests"] }
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "54c5e386f01ab37c9305cc4a83404eb157e42440", features = ["proptests"] }
quickcheck = "1"
clap = "3.0.0-beta.5"
serde = { version = "1.0", features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/libcontainer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ libc = "0.2.107"
log = "0.4"
mio = { version = "0.7.14", features = ["os-ext", "os-poll"] }
nix = "0.23.0"
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "d6fb1e91742313cd0d0085937e2d6df5d4669720" }
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "54c5e386f01ab37c9305cc4a83404eb157e42440" }
path-clean = "0.1.0"
procfs = "0.11.0"
prctl = "1.0.0"
Expand All @@ -28,6 +28,6 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

[dev-dependencies]
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "d6fb1e91742313cd0d0085937e2d6df5d4669720", features = ["proptests"] }
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "54c5e386f01ab37c9305cc4a83404eb157e42440", features = ["proptests"] }
quickcheck = "1"
serial_test = "0.5.1"
3 changes: 1 addition & 2 deletions crates/libcontainer/src/seccomp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,7 @@ pub fn initialize_seccomp(seccomp: &LinuxSeccomp) -> Result<Option<io::RawFd>> {

check_seccomp(seccomp)?;

// TODO: fix default action error number. The spec repo doesn't have it yet.
let default_action = translate_action(seccomp.default_action(), None);
let default_action = translate_action(seccomp.default_action(), seccomp.default_errno_ret());
let mut ctx = FilterContext::default(default_action)?;

if let Some(architectures) = seccomp.architectures() {
Expand Down

0 comments on commit 8cc892a

Please sign in to comment.