install: do not call chown when called as root #9477
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.
pseudo is a tool which simulates being root by intercepting calls to e.g.
geteuidandchown(by using theLD_PRELOADmechanism). This is used e.g. by yocto to build filesystems for embedded devices without running as root on the build machine.the
chowncall getting removed in this commit does not work when running withpseudoand usingPSEUDO_IGNORE_PATHS: in this case, the call togeteuid()gets intercepted bylibpseudo.soand returns 0, however the call tochown()isn't intercepted bylibpseudo.soin case it is in a path fromPSEUDO_IGNORE_PATHS, and will thus fail since the process is not really rootthe call to
chown()was added in install: Manages permissions when run as root #5735 with the intent of making the testinstall-C-root.shpass, however it isn't required (GNU coreutils also does not callchownjust becauseinstallwas called as root)Fixes #9116