git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/1] support GIT_IGNORE_INSECURE_OWNER environment variable

From
Florian Schmaus <flo@geekplace.eu>
Date
Jun 26, 2024, 12:33 UTC
Message-ID
<20240626123358.420292-1-flo@geekplace.eu>

I could imagine that the safe-directory check was deliberately not made controllable via an environment variable. However, git versions with the safe-directory check gained adoption and we can now see that there is some fallout caused by the check.

A prominent example is that git-daemon cannot export repos when running under nobody (see https://bugs.gentoo.org/932091). Since the 'nobody' user typically has no home directory, the suggested fix

        git config --global --add safe.directory xxx.git

does not work. Likewise, adding it to /etc/gitconfig is also not ideal, as it applies to every user.

In Gentoo, the safe-directory check can be completely disabled via a USE-flag (i.e., Gentoo's mechanism for compile-time package customization). However, I recently suggested to Gentoo's git-package maintainers the following patch, introducing the GIT_IGNORE_INSECURE_OWNER environment variable, as an alternative.

Being able to disable the safe directory check via an environment variable allows for more flexibility, solves the issue described above, and does *not* statically and globally disable the safe-directory check. This was received with a positive response and the patch will likely be applied by Gentoo.

But downstream patchery is always the second-best option. Therefore, I hereby propose the patch to upstream.

Florian Schmaus (1):
  setup: support GIT_IGNORE_INSECURE_OWNER environment variable
 setup.c | 8 ++++++++
 1 file changed, 8 insertions(+)
-- 
2.44.2
Next: Florian Schmaus
Message 1 of 20 in “support GIT_IGNORE_INSECURE_OWNER environment variable”
  1. 0/1 support GIT_IGNORE_INSECURE_OWNER environment variableFlorian Schmaus, Jun 26, 2024
  2. setup: support GIT_IGNORE_INSECURE_OWNER environment variableFlorian Schmaus, Jun 26, 2024
  3. Phillip WoodJun 26, 2024
  4. rsbecker@nexbridge.comJun 26, 2024
  5. phillip.wood123@gmail.comJun 26, 2024
  6. Phillip WoodJun 26, 2024
  7. Junio C HamanoJun 26, 2024
  8. Florian SchmausJun 26, 2024
  9. Jeff KingJun 26, 2024
  10. Phillip WoodJun 27, 2024
  11. Junio C HamanoJun 27, 2024
  12. Phillip WoodJun 28, 2024
  13. Junio C HamanoJun 28, 2024
  14. Phillip WoodJul 1, 2024
  15. Junio C HamanoJul 1, 2024
  16. Johannes SchindelinJul 1, 2024
  17. Jeff KingJul 1, 2024
  18. Junio C HamanoJul 1, 2024
  19. Jeff KingJul 1, 2024
  20. Eric WongJul 2, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.