From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id B11171F4D7 for ; Fri, 6 May 2022 20:01:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1392404AbiEFUE1 (ORCPT ); Fri, 6 May 2022 16:04:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1392475AbiEFUE0 (ORCPT ); Fri, 6 May 2022 16:04:26 -0400 Received: from pb-smtp21.pobox.com (pb-smtp21.pobox.com [173.228.157.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 490885F8D7 for ; Fri, 6 May 2022 13:00:41 -0700 (PDT) Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 05922186A22; Fri, 6 May 2022 16:00:40 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=+/SI+aRi1uHjyPN86G/KZVOh3fIXvsCK6Xdzc0 yx8so=; b=X7O8l6RddSFBmolg9hIIJ0u8cWYVOIHa/0xGaXIcWw6GHjT6iSi5TC ZJtMOfkcoRtdHPfeDeV5AYBxgQnKNTExpUxGONpIijSnqt5taeBVuSFjnc4GPeo4 HHaF4bHU1dq2wYbkhNYZkWiUGGgJYf44PeT/o5rg3KKedTqcUzqXc= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id F1B32186A21; Fri, 6 May 2022 16:00:39 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.83.65.128]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 9F1B6186A1C; Fri, 6 May 2022 16:00:36 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Carlo Arenas Cc: phillip.wood@dunelm.org.uk, Johannes Schindelin , git@vger.kernel.org, bagasdotme@gmail.com, Guy Maurel , SZEDER =?utf-8?Q?G=C3=A1bor?= , Randall Becker Subject: Re: [PATCH v3 2/3] git-compat-util: avoid failing dir ownership checks if running privileged References: <20220428105852.94449-1-carenas@gmail.com> <20220503065442.95699-1-carenas@gmail.com> <20220503065442.95699-3-carenas@gmail.com> Date: Fri, 06 May 2022 13:00:35 -0700 In-Reply-To: (Carlo Arenas's message of "Fri, 6 May 2022 12:15:06 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 3214EA46-CD77-11EC-A9A5-CBA7845BAAA9-77302942!pb-smtp21.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Carlo Arenas 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.