From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:58:12 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5AD954CDA1; Tue, 2 Mar 2021 18:58:12 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqmc45qR1z3CHq; Tue, 2 Mar 2021 18:58:12 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:9508:6d03:14a7:a372]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 81F9E9016; Tue, 2 Mar 2021 18:58:12 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: rgrimes@FreeBSD.org, Brandon Bergren Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202103021856.122IuYgV048086@gndrsh.dnsmgr.net> From: Nathan Whitehorn Message-ID: <3d947e4c-a529-0b27-a8d7-415600783e53@freebsd.org> Date: Tue, 2 Mar 2021 13:58:12 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <202103021856.122IuYgV048086@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:58:12 -0000 On 3/2/21 1:56 PM, Rodney W. Grimes wrote: >> >> On Tue, Mar 2, 2021, at 12:26 PM, Rodney W. Grimes wrote: >>> This fails to apply the proper owner/group and mode values >>> using what ever defaults are in place of the process running >>> the build. >> Keep in mind that this is the root of a mounted filesystem in the case where it matters, and the filesystem being mounted there doesn't support proper modes anyway, so the mtree values are a bit irrelevant anyway as the actual control of that is in the fstab. > That assumes the mount is done and/or kept. My concern is more > of a lack security (aka world writable) /boot/efi getting created > in a distribution that then is *not* mounted for some reason, > either by choice or error. > > mkdir should be stricken from use when possible, install -d > should be used instead. > But that can't happen in this code. For one thing, it's only used in a controlled environment to generate SD-card images for a handful of ARM boards. For another the mount is set up and installed in fstab a couple lines further down the same script. -Nathan