summaryrefslogtreecommitdiff
path: root/docs/markdown/Installing.md
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-02-07 21:24:55 -0500
committerEli Schwartz <eschwartz@archlinux.org>2023-02-20 22:33:46 -0500
commitecb32bf457ed27b75c9b4386ca1acfbd4b63869e (patch)
treebd1399cfde6eaec22c56d03ffd2cf016acdc9777 /docs/markdown/Installing.md
parenta878c38476dbe886bf26bc7bafb07bd4f20f763e (diff)
downloadmeson-ecb32bf457ed27b75c9b4386ca1acfbd4b63869e.tar.gz
minstall: drop privileges before running rebuild_all
If the user runs `sudo meson install` this may run ninja to build everything that gets installed. This naturally happens as root also, by default, which is bad. Instead, detect root elevation tools and drop the uid/gid of the child ninja process back to the original invoking user before doing anything.
Diffstat (limited to 'docs/markdown/Installing.md')
-rw-r--r--docs/markdown/Installing.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/markdown/Installing.md b/docs/markdown/Installing.md
index 0bc9a4744..2d18c178f 100644
--- a/docs/markdown/Installing.md
+++ b/docs/markdown/Installing.md
@@ -110,7 +110,9 @@ targets as root. This results in various bad behaviors due to build outputs and
ninja internal files being owned by root.
Running `meson install` is preferred for several reasons. It can rebuild out of
-date targets and then re-invoke itself as root.
+date targets and then re-invoke itself as root. *(since 1.1.0)* Additionally,
+running `sudo meson install` will drop permissions and rebuild out of date
+targets as the original user, not as root.
*(since 1.1.0)* Re-invoking as root will try to guess the user's preferred method for
re-running commands as root. The order of precedence is: sudo, doas, pkexec