From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4C16E15815E for ; Sun, 11 Feb 2024 13:08:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3A05EE2A75; Sun, 11 Feb 2024 13:08:36 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D78BCE2A00 for ; Sun, 11 Feb 2024 13:08:35 +0000 (UTC) Message-ID: <4cf02e385829b6e72c6bcd33665ad17d89d2b475.camel@gentoo.org> Subject: Re: [gentoo-dev] RFC: Setting default HOME_MODE in /etc/login.defs From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: chewi@gentoo.org Date: Sun, 11 Feb 2024 14:08:27 +0100 In-Reply-To: <878r3rqpkz.fsf@gentoo.org> References: <5d9776b3cea5c060ba73491a771f9736f255100d.camel@gentoo.org> <878r3rqpkz.fsf@gentoo.org> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-8svpD9aIRXW+auHgpxmk" User-Agent: Evolution 3.50.4 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 X-Archives-Salt: 3247e057-96c5-4f2d-aba9-5a2bbf050117 X-Archives-Hash: a7912e8e855ccae09ecb11b9ea101f32 --=-8svpD9aIRXW+auHgpxmk Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 2024-02-11 at 10:06 +0000, Sam James wrote: > Michael Orlitzky writes: >=20 > > On Sat, 2024-02-10 at 17:57 +0100, Daniel Simionato wrote: > > > Hello, > > > I'd like to start a discussion regarding setting HOME_MODE by defaul= t in > > > the /etc/login.defs file (owned by sys-apps/shadow package). > > >=20 > > > Upstream keeps HOME_MODE commented: > > > https://github.com/shadow-maint/shadow/blob/3e59e9613ec40c51c19c7bb5c= 28468e33a4529d5/etc/login.defs#L207 > > >=20 > > > HOME_MODE affects only useradd and newuser commands: if HOME_MODE is = set, > > > they will use the specified permission when creating a user home dire= ctory, > > > otherwise the default UMASK will be used. > > > Since the default umask is 022, keeping HOME_MODE unset will result i= n home > > > readable home direct > >=20 > > umask 022 is also egregious, changing it to 027 would kill two birds. > > But in lieu of that, yes. >=20 > mgorny wrote in favour of this 13 years ago too: > https://blogs.gentoo.org/mgorny/2011/10/18/027-umask-a-compromise-between= -security-and-simplicity/. >=20 > It would be a bigger change and require us to do a lot of daily-driver > testing first though. ...and I've stopped using that a long time ago too because I kept messing permissions up. These days I just explicitly switch umask if I need something to be secure. --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-8svpD9aIRXW+auHgpxmk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmXIxssSHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOxX4H+QGqW+5MvW5ZlY63tkoo9I/4NgeLRTB1 DTZi8XzzZnroQWaXGlc4RE833/tjBoSf3/hix/8BVIaJLwEzKEgzpNwyLaXOECB/ kaxRFmsDdNwQZ58dcUtrrOpopW5PKHmZJUyIqih6SS1X39ZJ1ZnjzDdKTuvs7GvL LdJ0gSLIIvX4IEeYSLyhJ6TJIf5FHiILxmk4rPeXLVGGw4mbod2jOLtGGoUyJbY4 +7ItRTX0Z8NnVgSFYyTEPWnQ9xfcWCjJ2EqhHs0dVxIfnHWxlQF4ozrBO52YWTg1 8sslYjcMzQKJn1rOBwtwOviXVVQrZ5g+FUrAqfrz8xDKulca+MKNc9A= =vTRG -----END PGP SIGNATURE----- --=-8svpD9aIRXW+auHgpxmk--