diff --git a/Cargo.lock b/Cargo.lock index 77dbb2f2ac..4e0ad29fc0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -445,12 +445,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "cfg_aliases" version = "0.2.1" @@ -576,7 +570,7 @@ dependencies = [ "flate2", "libcgroups", "libcontainer", - "nix 0.28.0", + "nix", "num_cpus", "oci-spec", "once_cell", @@ -1994,7 +1988,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d8306b516a70a129cb6afed17c1e51e162d35aadfcc6339364addcebe32de90" dependencies = [ "cc", - "nix 0.29.0", + "nix", "pkg-config", ] @@ -2016,7 +2010,7 @@ dependencies = [ "libbpf-sys", "libc", "mockall", - "nix 0.28.0", + "nix", "oci-spec", "procfs", "quickcheck", @@ -2041,7 +2035,7 @@ dependencies = [ "libcgroups", "libseccomp", "nc", - "nix 0.28.0", + "nix", "oci-spec", "once_cell", "prctl", @@ -2338,19 +2332,6 @@ dependencies = [ "cc", ] -[[package]] -name = "nix" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" -dependencies = [ - "bitflags 2.6.0", - "cfg-if", - "cfg_aliases 0.1.1", - "libc", - "memoffset 0.9.1", -] - [[package]] name = "nix" version = "0.29.0" @@ -2359,8 +2340,9 @@ checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ "bitflags 2.6.0", "cfg-if", - "cfg_aliases 0.2.1", + "cfg_aliases", "libc", + "memoffset 0.9.1", ] [[package]] @@ -2770,7 +2752,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "059a34f111a9dee2ce1ac2826a68b24601c4298cfeb1a587c3cb493d5ab46f52" dependencies = [ "libc", - "nix 0.29.0", + "nix", ] [[package]] @@ -3308,7 +3290,7 @@ dependencies = [ "anyhow", "libc", "nc", - "nix 0.28.0", + "nix", "oci-spec", ] @@ -6068,7 +6050,7 @@ dependencies = [ "libcgroups", "libcontainer", "liboci-cli", - "nix 0.28.0", + "nix", "pentacle", "procfs", "scopeguard", diff --git a/crates/libcgroups/Cargo.toml b/crates/libcgroups/Cargo.toml index 7b2f25ddbc..a40ebaa567 100644 --- a/crates/libcgroups/Cargo.toml +++ b/crates/libcgroups/Cargo.toml @@ -20,7 +20,7 @@ systemd = ["v2", "nix/socket", "nix/uio"] cgroupsv2_devices = ["rbpf", "libbpf-sys", "errno", "libc", "nix/dir"] [dependencies] -nix = { version = "0.28.0", features = ["signal", "user", "fs"] } +nix = { version = "0.29.0", features = ["signal", "user", "fs"] } procfs = "0.17.0" oci-spec = { version = "~0.7.1", features = ["runtime"] } fixedbitset = "0.5.7" diff --git a/crates/libcontainer/Cargo.toml b/crates/libcontainer/Cargo.toml index 0b5f0023ce..c87d4bdd37 100644 --- a/crates/libcontainer/Cargo.toml +++ b/crates/libcontainer/Cargo.toml @@ -27,7 +27,7 @@ chrono = { version = "0.4", default-features = false, features = [ ] } fastrand = "^2.3.0" libc = "0.2.171" -nix = { version = "0.28.0", features = [ +nix = { version = "0.29.0", features = [ "socket", "sched", "mount", diff --git a/crates/libcontainer/src/channel.rs b/crates/libcontainer/src/channel.rs index fd2ea6c046..c1dc83a063 100644 --- a/crates/libcontainer/src/channel.rs +++ b/crates/libcontainer/src/channel.rs @@ -123,7 +123,7 @@ where // there is only one SCM_RIGHTS message and will only process the first // message. let fds: Option = msg - .cmsgs() + .cmsgs()? .find_map(|cmsg| { if let socket::ControlMessageOwned::ScmRights(fds) = cmsg { Some(fds) diff --git a/crates/youki/Cargo.toml b/crates/youki/Cargo.toml index ce73c02910..b53df466f1 100644 --- a/crates/youki/Cargo.toml +++ b/crates/youki/Cargo.toml @@ -33,7 +33,7 @@ chrono = { version = "0.4", default-features = false, features = ["clock", "serd libcgroups = { path = "../libcgroups", default-features = false, version = "0.5.3" } # MARK: Version libcontainer = { path = "../libcontainer", default-features = false, version = "0.5.3" } # MARK: Version liboci-cli = { path = "../liboci-cli", version = "0.5.3" } # MARK: Version -nix = "0.28.0" +nix = "0.29.0" pentacle = "1.1.0" procfs = "0.17.0" serde_json = "1.0" diff --git a/experiment/seccomp/Cargo.lock b/experiment/seccomp/Cargo.lock index 9ee70dd61a..2b7f4bfdf4 100644 --- a/experiment/seccomp/Cargo.lock +++ b/experiment/seccomp/Cargo.lock @@ -74,6 +74,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "gimli" version = "0.28.1" @@ -88,9 +94,9 @@ checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" [[package]] name = "lock_api" @@ -139,26 +145,27 @@ dependencies = [ [[package]] name = "nix" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ "bitflags", "cfg-if", + "cfg_aliases 0.1.1", "libc", - "memoffset", ] [[package]] name = "nix" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ "bitflags", "cfg-if", - "cfg_aliases", + "cfg_aliases 0.2.1", "libc", + "memoffset", ] [[package]] @@ -263,7 +270,7 @@ name = "seccomp" version = "0.0.0" dependencies = [ "anyhow", - "nix 0.27.1", + "nix 0.29.0", "prctl", "syscall-numbers", "syscalls", diff --git a/experiment/seccomp/Cargo.toml b/experiment/seccomp/Cargo.toml index 36044f609d..6656aae0e0 100644 --- a/experiment/seccomp/Cargo.toml +++ b/experiment/seccomp/Cargo.toml @@ -12,7 +12,7 @@ autoexamples = true keywords = ["youki", "container", "seccomp"] [dependencies] -nix = { version = "0.27.1", features = [ +nix = { version = "0.29.0", features = [ "ioctl", "socket", "sched", diff --git a/experiment/seccomp/src/main.rs b/experiment/seccomp/src/main.rs index e884c066d4..3761f65538 100644 --- a/experiment/seccomp/src/main.rs +++ b/experiment/seccomp/src/main.rs @@ -38,7 +38,7 @@ fn recv_fd(sock: RawFd) -> nix::Result> { let mut cmsg_buf = nix::cmsg_space!(RawFd); let msg = socket::recvmsg::(sock, &mut iov, Some(&mut cmsg_buf), MsgFlags::empty())?; - match msg.cmsgs().next() { + match msg.cmsgs()?.next() { Some(ControlMessageOwned::ScmRights(fds)) if !fds.is_empty() => { let fd = unsafe { F::from_raw_fd(fds[0]) }; Ok(Some(fd)) diff --git a/tests/contest/contest/Cargo.toml b/tests/contest/contest/Cargo.toml index 2e7c2b2ede..29ad6ec75b 100644 --- a/tests/contest/contest/Cargo.toml +++ b/tests/contest/contest/Cargo.toml @@ -8,7 +8,7 @@ anyhow = "1.0" flate2 = "1.1" libcgroups = { path = "../../../crates/libcgroups" } libcontainer = { path = "../../../crates/libcontainer" } -nix = "0.28.0" +nix = "0.29.0" num_cpus = "1.16" oci-spec = { version = "0.7.1", features = ["runtime"] } once_cell = "1.21.1" diff --git a/tests/contest/contest/src/tests/seccomp_notify/seccomp_agent.rs b/tests/contest/contest/src/tests/seccomp_notify/seccomp_agent.rs index e70a77b812..cefbb09489 100644 --- a/tests/contest/contest/src/tests/seccomp_notify/seccomp_agent.rs +++ b/tests/contest/contest/src/tests/seccomp_notify/seccomp_agent.rs @@ -59,7 +59,7 @@ pub fn recv_seccomp_listener(seccomp_listener: &Path) -> SeccompAgentResult { drop(socket); // We are expecting 1 SCM_RIGHTS message with 1 fd. let cmsg = msg - .cmsgs() + .cmsgs()? .next() .context("expecting at least 1 SCM_RIGHTS message")?; let fd = match cmsg { diff --git a/tests/contest/runtimetest/Cargo.toml b/tests/contest/runtimetest/Cargo.toml index 7540ed3346..027bf9ef32 100644 --- a/tests/contest/runtimetest/Cargo.toml +++ b/tests/contest/runtimetest/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" [dependencies] oci-spec = { version = "0.7.1", features = ["runtime"] } -nix = "0.28.0" +nix = "0.29.0" anyhow = "1.0" libc = "0.2.171" # TODO (YJDoc2) upgrade to latest nc = "0.9.5"