Repository navigation
fix(executor): real uid/euid identity instead of root emulation - #698
Merged
Merged
Conversation
uid_value fell back to hardcoded 0 (emulating a dev baseline that ran as root): every non-root host reported UID/EUID 0 and $ rendered #. GNU variables.c:984 uidset binds the real uid/euid, readonly; an inherited $UID/$EUID is kept. Now: env when set, else getuid()/geteuid() (Windows persona keeps 0). The 4 parameter_transform prompt tests pinned the author's account (alice) and root-ness; they now calibrate account+mark from a throwaway Executor (\u itself stays pinned by issue421 tests). 17/17 green on Android.
The default-prompt expectation pinned the root-emulation # marker; calibrate per host (geteuid on unix, # on Windows persona).
caomengxuan666
force-pushed
the
fix/prompt-uid-identity
branch
from
October 17, 2026 02:24
874c21b to
1b89878
Compare
caomengxuan666
added a commit
that referenced
this pull request
Oct 17, 2026
caomengxuan666
added a commit
that referenced
this pull request
Oct 17, 2026
#736) run_stdin inherited the developer HOME: a themed ~/.bashrc overrode the default prompt under test. Empty temp HOME per run. The # mark is euid-dependent (correct post-#698): calibrate per host via geteuid (unix) instead of pinning root. 8/8 green on Android. Co-authored-by: caomengxuan666 <[email protected]>
caomengxuan666
added a commit
that referenced
this pull request
Oct 17, 2026
…ts (#740) * fix(tests): hermetic HOME and root marker in repl channel tests (#419) run_stdin inherited the developer HOME: a themed ~/.bashrc overrode the default prompt under test. Empty temp HOME per run. The # mark is euid-dependent (correct post-#698): calibrate per host via geteuid (unix) instead of pinning root. 8/8 green on Android. * fix(tests): hermetic HOME, real paths, last-prompt match in pb10k tests Empty temp HOME per run (themed ~/.bashrc overrode PS1); deep dir uses the real temp path (/c-anchored cannot exist off Windows); post-cd prompt is the LAST matching line (startup prompt trims on deep checkouts). 2/2 green on Android. --------- Co-authored-by: caomengxuan666 <[email protected]>
caomengxuan666
added a commit
that referenced
this pull request
Oct 17, 2026
* fix(tests): hermetic HOME and root marker in repl channel tests (#419) run_stdin inherited the developer HOME: a themed ~/.bashrc overrode the default prompt under test. Empty temp HOME per run. The # mark is euid-dependent (correct post-#698): calibrate per host via geteuid (unix) instead of pinning root. 8/8 green on Android. * fix(tests): hermetic HOME, real paths, last-prompt match in pb10k tests Empty temp HOME per run (themed ~/.bashrc overrode PS1); deep dir uses the real temp path (/c-anchored cannot exist off Windows); post-cd prompt is the LAST matching line (startup prompt trims on deep checkouts). 2/2 green on Android. * fix(tests): pin signal death for fatal SIGINT/SIGTERM (#526) Untrapped INT/TERM kill non-interactive shells BY signal (GNU sig.c kill_shell; verified GNU itself reports signaled under a direct waiter — rc 130 exists only via the parent's jobs.c translation). The 130/143 expectations were unsatisfiable under this harness. Pin signaled (-1) + empty stdout instead. --------- Co-authored-by: caomengxuan666 <[email protected]>
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.
fix(executor): real uid/euid identity instead of root emulation
What
Non-root hosts reported
UID/EUIDas 0 and\$rendered#:uid_value()fell back to a hardcoded"0", emulating a dev baselinethat ran as root. GNU
variables.c:984 uidsetbinds the realuid/euid, readonly; an inherited
$UID/$EUIDis kept.Fix
Env when set, else
getuid()/geteuid()(Windows persona keeps 0).The 4
parameter_transformprompt tests pinned the author's account(
alice) and root-ness — green nowhere but the author's box; they nowcalibrate account+mark from a throwaway Executor (
\uitself stayspinned by the issue421 tests).
Verification
$EUID/$UID10275 and\$→$, byte-identical to GNU.parameter_transform_tests13+4 → 17/17; issue421 3/3; promptexecutor subset 20/20; lib 596/596.
are the DISAPPEARED set; the single NEW test pinned the old
root-emulation
#marker and is fixed in-branch (hermeticper-host mark; file now 10/10). Any remaining diffs are the known
coproc flakes (isolated green).
6295367, only rubash[patch]switched): failure sets byte-identical (8=8).