aboutsummaryrefslogtreecommitdiff
path: root/Documentation/config
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2022-06-23 12:36:03 +0200
committerJohannes Schindelin <johannes.schindelin@gmx.de>2022-06-23 12:36:03 +0200
commitaef3d5948c5b00a0409e117da7e720f574040505 (patch)
tree0faf03246ee43768f4eee7ef66e7a838e471958f /Documentation/config
parentd516b2db0af2221bd6b13e7347abdcb5830b2829 (diff)
parentf2eed22852b0a21556f0c9f56732913eba553e62 (diff)
downloadgit-aef3d5948c5b00a0409e117da7e720f574040505.tar.xz
Sync with 2.34.4
* maint-2.34: Git 2.34.4 Git 2.33.4 Git 2.32.3 Git 2.31.4 Git 2.30.5 setup: tighten ownership checks post CVE-2022-24765 git-compat-util: allow root to access both SUDO_UID and root owned t0034: add negative tests and allow git init to mostly work under sudo git-compat-util: avoid failing dir ownership checks if running privileged t: regression git needs safe.directory when using sudo
Diffstat (limited to 'Documentation/config')
-rw-r--r--Documentation/config/safe.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/config/safe.txt b/Documentation/config/safe.txt
index 6d764fe0cc..74627c5e7c 100644
--- a/Documentation/config/safe.txt
+++ b/Documentation/config/safe.txt
@@ -26,3 +26,17 @@ directory was listed in the `safe.directory` list. If `safe.directory=*`
is set in system config and you want to re-enable this protection, then
initialize your list with an empty value before listing the repositories
that you deem safe.
++
+As explained, Git only allows you to access repositories owned by
+yourself, i.e. the user who is running Git, by default. When Git
+is running as 'root' in a non Windows platform that provides sudo,
+however, git checks the SUDO_UID environment variable that sudo creates
+and will allow access to the uid recorded as its value in addition to
+the id from 'root'.
+This is to make it easy to perform a common sequence during installation
+"make && sudo make install". A git process running under 'sudo' runs as
+'root' but the 'sudo' command exports the environment variable to record
+which id the original user has.
+If that is not what you would prefer and want git to only trust
+repositories that are owned by root instead, then you can remove
+the `SUDO_UID` variable from root's environment before invoking git.