Repository navigation
Conversation
oech3
reviewed
Oct 18, 2026
| }; | ||
| // Follow each link separately: canonicalize would discard the utility name | ||
| // in an intermediate link such as dummy -> true -> coreutils. | ||
| for _ in 0..40 { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
limadog9
force-pushed
the
fix/coreutils-symlink-aliases-10946
branch
2 times, most recently
from
October 18, 2026 17:44
f918ead to
7477559
Compare
oech3
reviewed
Oct 18, 2026
| fn utility_from_symlink<T>(utils: &UtilityMap<T>, binary: &Path) -> Option<&'static str> { | ||
| use std::os::unix::fs::PermissionsExt; | ||
|
|
||
| // binary_path can return argv[0] on any Unix target; AT_EXECFN is not |
Contributor
There was a problem hiding this comment.
Would you restrict this to Linux and remove PATH lookup?
limadog9
force-pushed
the
fix/coreutils-symlink-aliases-10946
branch
2 times, most recently
from
October 18, 2026 18:08
37d5117 to
ad408e9
Compare
oech3
reviewed
Oct 18, 2026
| let execfn_bytes = execfn.to_bytes(); | ||
| let exec_path = Path::new(OsStr::from_bytes(execfn_bytes)); | ||
| let argv0 = args.next().unwrap(); | ||
| let same_name = execfn_bytes.rsplit(|&b| b == b'/').next() |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
limadog9
force-pushed
the
fix/coreutils-symlink-aliases-10946
branch
from
October 18, 2026 18:39
ad408e9 to
6dfc6f7
Compare
oech3
reviewed
Oct 18, 2026
| target_env = "gnu", | ||
| feature = "true", | ||
| feature = "false", | ||
| feature = "echo" |
limadog9
force-pushed
the
fix/coreutils-symlink-aliases-10946
branch
from
October 18, 2026 18:47
6dfc6f7 to
0355994
Compare
On Linux with glibc, resolve an unrecognized invocation name from its immediate symlink target. Reuse binary_path's kernel invocation path, retaining its full directory after PATH lookup. Cover relative and absolute targets, shell PATH invocation, argument forwarding, and invocation with PATH unset using echo. Closes uutils#10946.
limadog9
force-pushed
the
fix/coreutils-symlink-aliases-10946
branch
from
October 18, 2026 19:02
0355994 to
72acd75
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Unix, resolve an unrecognized invocation name through its symlink chain, including aliases found through PATH. This allows dummy -> true -> coreutils to run true.
Add coverage for relative links, multiple links, PATH lookup, argument forwarding, and utility exit status. All 18 multicall tests pass.
Closes #10946.