summaryrefslogtreecommitdiff
path: root/Documentation/config/safe.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-06-18 00:12:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-06-18 00:12:31 (GMT)
commit694c0cc0fb531b17750ac6e81920054f193f8eb8 (patch)
treefad0a4206959b893d567b876d64efa39ba032861 /Documentation/config/safe.txt
parentb4eda05d58ca3e4808d3d86ab5826c77995a06f7 (diff)
parent6b11e3d52e919cce91011f4f9025e6f4b61375f2 (diff)
downloadgit-694c0cc0fb531b17750ac6e81920054f193f8eb8.zip
git-694c0cc0fb531b17750ac6e81920054f193f8eb8.tar.gz
git-694c0cc0fb531b17750ac6e81920054f193f8eb8.tar.bz2
Merge branch 'cb/path-owner-check-with-sudo-plus'
"sudo git foo" used to consider a repository owned by the original user a safe one to access; it now also considers a repository owned by root a safe one, too (after all, if an attacker can craft a malicious repository owned by root, the box is 0wned already). * cb/path-owner-check-with-sudo-plus: git-compat-util: allow root to access both SUDO_UID and root owned
Diffstat (limited to 'Documentation/config/safe.txt')
-rw-r--r--Documentation/config/safe.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/Documentation/config/safe.txt b/Documentation/config/safe.txt
index 1ee10fa..fa02f3c 100644
--- a/Documentation/config/safe.txt
+++ b/Documentation/config/safe.txt
@@ -30,12 +30,13 @@ 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 instead.
+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 must remove
+repositories that are owned by root instead, then you can remove
the `SUDO_UID` variable from root's environment before invoking git.