Skip to content

docs: document id rustix LD_PRELOAD compatibility - #15261

Merged
sylvestre merged 2 commits into
uutils:mainfrom
mvanhorn:fix/13399-id-rustix-preload-compatibility
Oct 17, 2026
Merged

sylvestre merged 2 commits into
uutils:mainfrom
mvanhorn:fix/13399-id-rustix-preload-compatibility

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

The build section of README.md and the packaging guide now explain that this backend skips libc interposition, with fakeroot and id -u as the case that still reports the real UID. Under fakeroot, the multicall binary's id -u still prints the caller's real UID.

Closes #13399

AI was used for assistance.

The build section of README.md and the packaging guide now explain that
this backend skips libc interposition, with fakeroot and `id -u` as the
case that still reports the real UID. Both pages document `cargo build
--release --features unix,rustix/use-libc` to build the multicall binary
with rustix's libc wrappers, and they note that the backend is a
compile-time Cargo feature, that a statically linked executable still
cannot be interposed this way, and that the libc backend does not cover
every operation. The spell-checker ignore lists in both files include
fakeroot.

Refs uutils#13399
@oech3

oech3 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Please remove Closes #HASH . it should be closed after faleroot itself was fixed, or we worked around about it.

@oech3

oech3 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Also I don't think we should document this. We don't document other all bugs.

Comment thread README.md Outdated
cargo build -p uu_base32 -p uu_cat -p uu_echo -p uu_rm
```

#### libc interposition (`LD_PRELOAD`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is almost the same text as in packaging.md, please keep it only there

Comment thread docs/src/packaging.md
option in `cargo`.

On Linux, rustix's raw syscall backend bypasses libc function interposition.
An `LD_PRELOAD` interceptor such as `fakeroot` cannot override affected calls

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only id? if other utils are affected, please list them, otherwise say just id

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is probably difficult to list all utils. Add "for example" to somewhere.

Comment thread docs/src/packaging.md Outdated
cargo build --release --features unix,rustix/use-libc
```

This is a compile-time Cargo feature. No runtime setting selects the rustix

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please drop this paragraph? the line above already says it's a cargo feature

Per review: drop the duplicate README section, say the libc
interposition limit affects some utilities with id as an example, and
remove the paragraph that repeated that the backend is a Cargo feature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KFTE4BHbGYzgf8Uhzcppdh
@mvanhorn

Copy link
Copy Markdown
Contributor Author

Thanks @sylvestre, all three are in 7d35ab1: the README section is gone so the note lives only in packaging.md, the text now says some utilities are affected with id -u under fakeroot as the example (per @oech3's suggestion), and the Cargo feature paragraph is dropped. cspell and markdownlint are clean on packaging.md.

@sylvestre
sylvestre merged commit 9c28184 into uutils:main Oct 17, 2026
89 checks passed
@sylvestre

Copy link
Copy Markdown
Contributor

Thanks for your PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

id: rustix crate bypasses libc breaking LD_PRELOAD based tools

3 participants