From 2cdb64467cdd1c754b02542a5390fd1c70fc3cc7 Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Thu, 22 May 2025 15:24:50 -0500 Subject: [PATCH] chore: Update `nix` to latest --- Cargo.toml | 2 +- crates/runc/src/asynchronous/io.rs | 6 +++--- crates/runc/src/synchronous/io.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 93a31ae8..40a90cf1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ crossbeam = "0.8.1" futures = "0.3.19" libc = "0.2.112" log = {version = "0.4.2", features=["kv_unstable"]} -nix = "0.29" +nix = "0.30" oci-spec = "0.7" os_pipe = "1.1" prctl = "1.0.0" diff --git a/crates/runc/src/asynchronous/io.rs b/crates/runc/src/asynchronous/io.rs index 808efb74..14110cd4 100644 --- a/crates/runc/src/asynchronous/io.rs +++ b/crates/runc/src/asynchronous/io.rs @@ -14,7 +14,7 @@ limitations under the License. */ -use std::{fmt::Debug, io::Result, os::unix::io::AsRawFd, process::Stdio}; +use std::{fmt::Debug, io::Result, process::Stdio}; use async_trait::async_trait; use nix::unistd::{Gid, Uid}; @@ -67,10 +67,10 @@ impl PipedIo { let gid = Some(Gid::from_raw(gid)); if stdin { let rd = pipe.rd.try_clone()?; - nix::unistd::fchown(rd.as_raw_fd(), uid, gid)?; + nix::unistd::fchown(rd, uid, gid)?; } else { let wr = pipe.wr.try_clone()?; - nix::unistd::fchown(wr.as_raw_fd(), uid, gid)?; + nix::unistd::fchown(wr, uid, gid)?; } Ok(Some(pipe)) } diff --git a/crates/runc/src/synchronous/io.rs b/crates/runc/src/synchronous/io.rs index 60f2608f..c0e922c0 100644 --- a/crates/runc/src/synchronous/io.rs +++ b/crates/runc/src/synchronous/io.rs @@ -72,10 +72,10 @@ impl PipedIo { let gid = Some(Gid::from_raw(gid)); if stdin { let rd = pipe.rd.try_clone()?; - nix::unistd::fchown(rd.as_raw_fd(), uid, gid)?; + nix::unistd::fchown(rd, uid, gid)?; } else { let wr = pipe.wr.try_clone()?; - nix::unistd::fchown(wr.as_raw_fd(), uid, gid)?; + nix::unistd::fchown(wr, uid, gid)?; } Ok(Some(pipe)) }