From cb34b3da676e4ea63839fedd496c3eefaf93be7d Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 16 Apr 2026 19:10:34 +0200 Subject: [PATCH] Update ipcd to rand 0.10 --- Cargo.lock | 40 +++++++++++++++++++++++++++++++++++++++- ipcd/Cargo.toml | 2 +- ipcd/src/uds/dgram.rs | 4 ++-- ipcd/src/uds/stream.rs | 2 +- 4 files changed, 43 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bce49e16c3..91185a1f01 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -337,6 +337,17 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +[[package]] +name = "chacha20" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" +dependencies = [ + "cfg-if 1.0.4", + "cpufeatures", + "rand_core 0.10.1", +] + [[package]] name = "chashmap" version = "2.2.2" @@ -423,6 +434,15 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + [[package]] name = "crc" version = "3.4.0" @@ -883,6 +903,7 @@ dependencies = [ "cfg-if 1.0.4", "libc", "r-efi", + "rand_core 0.10.1", "wasip2", "wasip3", ] @@ -1124,7 +1145,7 @@ dependencies = [ "daemon", "libc", "libredox", - "rand 0.8.5", + "rand 0.10.1", "redox-scheme", "redox_event", "redox_syscall 0.7.3", @@ -1643,6 +1664,17 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" +dependencies = [ + "chacha20", + "getrandom 0.4.2", + "rand_core 0.10.1", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -1693,6 +1725,12 @@ dependencies = [ "getrandom 0.2.17", ] +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + [[package]] name = "randd" version = "0.1.0" diff --git a/ipcd/Cargo.toml b/ipcd/Cargo.toml index d7d8717b3d..e157df579f 100644 --- a/ipcd/Cargo.toml +++ b/ipcd/Cargo.toml @@ -13,7 +13,7 @@ scheme-utils = { path = "../scheme-utils" } redox_event.workspace = true anyhow.workspace = true libc.workspace = true -rand = { version = "0.8", features = ["small_rng"] } +rand = "0.10" [lints] workspace = true diff --git a/ipcd/src/uds/dgram.rs b/ipcd/src/uds/dgram.rs index f4d1f6dcbe..d68cbbc8ee 100644 --- a/ipcd/src/uds/dgram.rs +++ b/ipcd/src/uds/dgram.rs @@ -8,7 +8,7 @@ use super::{ use libc::{AF_UNIX, SO_DOMAIN, SO_PASSCRED}; use libredox::protocol::SocketCall; use rand::rngs::SmallRng; -use rand::{RngCore, SeedableRng}; +use rand::Rng; use redox_scheme::{ scheme::SchemeSync, CallerCtx, OpenResult, RecvFdRequest, Response, SendFdRequest, SignalBehavior, Socket as SchemeSocket, @@ -151,7 +151,7 @@ impl<'sock> UdsDgramScheme<'sock> { 0, )? }, - rng: SmallRng::from_entropy(), + rng: rand::make_rng(), }) } diff --git a/ipcd/src/uds/stream.rs b/ipcd/src/uds/stream.rs index 2b7700e293..c258a1c0e4 100644 --- a/ipcd/src/uds/stream.rs +++ b/ipcd/src/uds/stream.rs @@ -410,7 +410,7 @@ impl<'sock> UdsStreamScheme<'sock> { 0, )? }, - rng: SmallRng::from_entropy(), + rng: rand::make_rng(), }) }