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

Re: [PATCH 0/3] Updates to the safe.directory config option

From
Derrick Stolee <derrickstolee@github.com>
Date
Apr 13, 2022, 16:25 UTC
Message-ID
<e8383303-e82c-dc23-9f28-6ff566021e82@github.com>
In-Reply-To
<xmqq35iharig.fsf@gitster.g>
On 4/13/2022 12:15 PM, Junio C Hamano wrote:
Show 9 quoted lines
> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
>> Here is a very fast response to the security release yesterday.
> 
> Wow.  While I were down the whole day yesterday after sending the
> release announcement, it seems a lot have happened X-<.  Does your
> "a very fast" expect only "wow, thanks for a fast reponse", or does
> it also expect "ok, we'll take a deep look with a spoonful of salt
> as it was prepared in haste"?

I tried to do my due diligence here, but I will admit to some amount of haste being applied due to the many distinct sources that have motivated the change.

Show 20 quoted lines
>> The second patch here is an adaptation from a contributor who created a pull
>> request against git/git [1]. I augmented the patch with a test (the test
>> infrastructure is added in patch 1).
>>
>> The third patch is a change to the safe.directory config option to include a
>> possible "*" value to completely opt-out of the check. This will be
>> particularly helpful for cases where users run Git commands within a
>> container. This container workflow always runs as a different user than the
>> host, but also the container does not have access to the host's system or
>> global config files. It's also helpful for users who don't want to set the
>> config for a large number of shared repositories [2].
> 
> Let me take a look how well these integrate into the maintenance
> tracks.
> 
> I would appreciate something that is targetted and narrow that can
> be applied to the oldest maintenance track (2.30.3) and then merged
> upwards, plus niceties on top that does not necessarily have to
> apply to the oldest ones if the surrounding code or tests were
> changed more recently.

The tests that are added are in a new test file, so hopefully those don't collide with anything.

The changes in setup.c apply within the ensure_valid_ownership() so should apply to any versions that have the fix.

Thanks, -Stolee

Previous: Junio C HamanoNext: Junio C Hamano
Message 13 of 39 in “Updates to the safe.directory config option”
  1. 0/3 Updates to the safe.directory config optionDerrick Stolee via GitGitGadget, Apr 13, 2022
  2. 1/3 t0033: add tests for safe.directoryDerrick Stolee via GitGitGadget, Apr 13, 2022
  3. Junio C HamanoApr 13, 2022
  4. Derrick StoleeApr 13, 2022
  5. Ævar Arnfjörð BjarmasonApr 13, 2022
  6. Junio C HamanoApr 13, 2022
  7. Derrick StoleeApr 13, 2022
  8. 2/3 setup: fix safe.directory key not being checkedMatheus Valadares via GitGitGadget, Apr 13, 2022
  9. Junio C HamanoApr 13, 2022
  10. 3/3 setup: opt-out of check with safe.directory=*Derrick Stolee via GitGitGadget, Apr 13, 2022
  11. Junio C HamanoApr 13, 2022
  12. Junio C HamanoApr 13, 2022
  13. Derrick StoleeApr 13, 2022
  14. Junio C HamanoApr 13, 2022
  15. Junio C HamanoApr 13, 2022
  16. Taylor BlauApr 13, 2022
  17. Junio C HamanoApr 13, 2022
  18. 0/3 t0033-safe-directory: test improvements and a documentation clarificationSZEDER Gábor, Apr 27, 2022
  19. 1/3 t0033-safe-directory: check the error message without matching the trash dirSZEDER Gábor, Apr 27, 2022
  20. Taylor BlauMay 9, 2022
  21. Carlo Marcelo Arenas BelónMay 10, 2022
  22. 2/3 t0033-safe-directory: check when 'safe.directory' is ignoredSZEDER Gábor, Apr 27, 2022
  23. Junio C HamanoApr 27, 2022
  24. Derrick StoleeApr 29, 2022
  25. Junio C HamanoApr 29, 2022
  26. SZEDER GáborApr 29, 2022
  27. Derrick StoleeApr 29, 2022
  28. SZEDER GáborMay 10, 2022
  29. Taylor BlauMay 10, 2022
  30. Carlo Marcelo Arenas BelónMay 10, 2022
  31. Taylor BlauMay 10, 2022
  32. Eric SunshineMay 10, 2022
  33. 3/3 safe.directory: document and check that it's ignored in the environmentSZEDER Gábor, Apr 27, 2022
  34. Junio C HamanoApr 27, 2022
  35. Junio C HamanoApr 27, 2022
  36. Derrick StoleeApr 29, 2022
  37. SZEDER GáborMay 9, 2022
  38. Junio C HamanoMay 9, 2022
  39. SZEDER GáborMay 10, 2022

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.