Commit b7e037f
committed
install: do not call chown when called as root
- `pseudo` is a tool which simulates being root by intercepting calls to e.g. `geteuid` and `chown` (by using the `LD_PRELOAD` mechanism). This is used e.g. to build filesystems for embedded devices without running as root on the build machine.
- the `chown` call getting removed in this commit does not work when running with `pseudo` and using `PSEUDO_IGNORE_PATHS`: in this case, the call to `geteuid()` gets intercepted by `libpseudo.so` and returns 0, however the call to `chown()` isn't intercepted by `libpseudo.so` in case it is in a path from `PSEUDO_IGNORE_PATHS`, and will thus fail since the process is not really root
- the call to `chown()` was added in #5735 with the intent of making the test `install-C-root.sh` pass, however it isn't required (GNU coreutils also does not call `chown` just because `install` was called as root)
Fixes #9116
Signed-off-by: Etienne Cordonnier <[email protected]>1 parent 876ac06 commit b7e037f
1 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
714 | | - | |
| 714 | + | |
715 | 715 | | |
716 | 716 | | |
717 | | - | |
718 | 717 | | |
719 | 718 | | |
720 | 719 | | |
| |||
735 | 734 | | |
736 | 735 | | |
737 | 736 | | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | 737 | | |
742 | | - | |
| 738 | + | |
743 | 739 | | |
744 | 740 | | |
745 | 741 | | |
| |||
0 commit comments