Re: [PATCH v5 2/4] git-compat-util: avoid failing dir ownership checks if running privileged
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Jun 3, 2022, 17:34 UTC
- Message-ID
- <20220603173427.GC1749@szeder.dev>
- In-Reply-To
- <xmqqtu91helx.fsf@gitster.g>
On Fri, Jun 03, 2022 at 09:54:34AM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> SZEDER Gábor <szeder.dev@gmail.com> writes: > > > Unfortunately, I haven't been able to follow the discussion on this > > patch series at all, but by a cursory look now I didn't notice any > > discussion about what should happen if someone were to use 'sudo' to > > access a repository owned by root. I think it should work, and it did > > in fact work in the past, even after bdc77d1d685, but this patch > > broke it. > > I thought 4/4 of the series was meant to discuss that? Right now it > is split out as Carlo was hesitant to push the step forward? > > https://lore.kernel.org/git/20220519152344.ktrifm3pc42bjruh@Carlos-MacBook-Pro-2.local/ >
Oh, indeed. I only looked through my mailbox, not the ML archives, and I wasn't on Cc for the last two patches of the series. Thanks for pointing it out.
I think we do need that additional fix as well, because we now break at least one tool built around Git.
Though looking at patch 4/4, I'm not so keen about restructuring the extract_id_from_env() helper function into id_from_env_matches(), because I'd prefer to have a helper function for ID extraction and nothing else, and to have all the uid matching inside one function.