id: rustix crate bypasses libc breaking LD_PRELOAD based tools
Author: BAMF0Created Jul 14, 2026Updated Sep 30, 2026
LabelsU - id
Problem
- https://github.com/uutils/coreutils/commit/37c42a29caa9f20a7d509cf59b9f3d177075aa5c replaced the
nixcrate withrustixforid. rustixuses raw syscalls for functions such asgetuid(), rather than the libc wrapper.- Tools like
fakerootrely on the libc wrapper to intercept function calls usingLD_PRELOADin order to return fake values.
Reproduce
- Build uutils/coreutils version 0.9.0 using the release profile
- Install
fakeroot:
# Debian / Ubuntu
sudo apt install fakeroot
# Fedora / RHEL
sudo dnf install fakeroot
# Arch Linux
sudo pacman -S fakeroot- Run the built
id:
idOutput:
1000- Run
fakerootagainst the builtid:
fakeroot ./target/release/coreutils id -uOutput:
1000Expected behavior
fakeroot should be able to intercept the id command and instead print:
0as if it were root.
Source: uutils/coreutils