Re: [PATCH v3 2/3] git-compat-util: avoid failing dir ownership checks if running privileged
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 6, 2022, 20:00 UTC
- Message-ID
- <xmqq35hml9cs.fsf@gitster.g>
- In-Reply-To
- <CAPUEspiMsvNhQF-RjW5eu3Xco9gU7TFt4w9dOOcF1PGM4Z+ceQ@mail.gmail.com>
Carlo Arenas <carenas@gmail.com> writes:
> which is also why we can't use it, any possibly bogus or suspicious > value we get from SUDO_UID MUST be ignored.
I do not think I agree. If we have strange value in SUDO_UID, it would be much better and safer to err on the safe side.
Instead of ignoring, in the situation where we care about the value we read from SUDO_UID (i.e. when euid==0), we should die loudly when it has a strange value.