Skip to content

Commit d449548

Browse files
committed
deps(rustix): enable use-libc to route syscalls through glibc
Without use-libc, rustix uses direct inline assembly syscalls, bypassing glibc entirely. On a glibc-based system like Debian, this can break LD_PRELOAD interposition, sanitizers, and miss glibc optimizations like the getpid() cache.
1 parent 002415b commit d449548

4 files changed

Lines changed: 3 additions & 6 deletions

File tree

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,9 @@ rstest = "0.26.0"
450450
rstest_reuse = "0.7.0"
451451
rustc-hash = "2.1.1"
452452
rust-ini = "0.21.0"
453-
# binary name of coreutils can be hijacked by overriding getauxval via LD_PRELOAD
454-
# So we use param and avoid libc backend
455-
rustix = { version = "1.1.4", features = ["param"] }
453+
# param: binary name of coreutils can be hijacked by overriding getauxval via LD_PRELOAD
454+
# use-libc: route syscalls through glibc (not direct asm) for LD_PRELOAD/sanitizer compat
455+
rustix = { version = "1.1.4", features = ["param", "use-libc"] }
456456
same-file = "1.0.6"
457457
self_cell = "1.0.4"
458458
selinux = "0.6"

src/uu/tail/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ name = "uu_tail"
44
description = "tail ~ (uutils) display the last lines of input"
55
repository = "https://github.com/uutils/coreutils/tree/main/src/uu/tail"
66
version.workspace = true
7-
authors.workspace = true
87
license.workspace = true
98
homepage.workspace = true
109
keywords.workspace = true

src/uu/tty/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "uu_tty"
33
description = "tty ~ (uutils) display the name of the terminal connected to standard input"
44
repository = "https://github.com/uutils/coreutils/tree/main/src/uu/tty"
55
version.workspace = true
6-
authors.workspace = true
76
license.workspace = true
87
homepage.workspace = true
98
keywords.workspace = true

src/uucore/src/lib/features/i18n/datetime.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ pub fn get_locale_months() -> Option<&'static [Vec<u8>; 12]> {
178178
target_os = "dragonfly"
179179
))]
180180
fn get_locale_months_inner() -> Option<[Vec<u8>; 12]> {
181-
use nix::libc;
182181
use std::ffi::CStr;
183182

184183
let abmon_items: [libc::nl_item; 12] = [

0 commit comments

Comments
 (0)