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 70A4015815E for ; Sun, 11 Feb 2024 11:16:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8B5532BC018; Sun, 11 Feb 2024 11:16:40 +0000 (UTC) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2DFB5E2A4C for ; Sun, 11 Feb 2024 11:16:40 +0000 (UTC) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-561587ce966so2404886a12.1 for ; Sun, 11 Feb 2024 03:16:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707650199; x=1708254999; darn=lists.gentoo.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=0N3fJbghfzBPrTZgVS7SmhmnqiIU57mf0co4fUZ/G7E=; b=mOcheEV1H2SRA+lG3FzjHnGjdp/xg3KQ8SE/kXsv09cEj5n5s+QALgn+NFUtp+lVjU cw//TDGogghkPFWRbS4zbBmW3MxVuo7fXQm7gRydefbyFmkfaEp+H0FqnZyHgyaZcM7P v3XMX+4S5J+DhLdneW2HqTX/C/Ky4o00Gu3bDapEVreVSCqhdGBNEMMdC1kZGscGquqv K0RVBRpIV4KA614gDot7Vrx1qYWWom0BF+Os8jbhXd7ykD/PXR/N33k981fSnnR8CG2w 144ehTn1IOeYZ6SrWBp7w54bZppDRe95wfyecWM2pdR6gRzok7Dg+IrDO4nmgjsEFA+a Ds9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707650199; x=1708254999; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0N3fJbghfzBPrTZgVS7SmhmnqiIU57mf0co4fUZ/G7E=; b=KHcNvv8vrZpkrGEogTZi462vnmP6Ah1wcDmty5skr5bzq+Knhgq+/+ML7QU+lyI+II uR6kGR2Jp7d59MX5aOBHwpXMKjIlsLqCk5KNIF9vhBMif+8d0J8psHZYwpJ4IZ71NJeU CAf8A4JgTRi253ViofdcAbnF8C2fhBIkUdFRfR/WUzJvUTLEJwRN1HcmEQ2cMVwSqaOS qE0tQIAVTGcZFNGEYFpR2JPuhai1tBhpq9MKUjLQhUpBVnhy+NHI9TJ87Lyl1C+XWj5n 83YbAhFEdAGSCsa3otN+zf8JMdOGJzX5APaEE7ZIrp5FNlwR/Pc7vrl774P/x9S+hOgP 8nJQ== X-Gm-Message-State: AOJu0YwGOCd5h4JmXCABOwqWjW47+DPDP2kV9VZrIpDEQLl23Z6Ufuw6 JirstApVIv9eY4XvTrivw8Hf/e/R8IROKjCo3MJGzeS5+tMNkkaGNE95FEbUc8hKKzkOCDD/k50 66lDgkmGrX8N4LkIpFm+mNFppdTXgX2Y0BSM= X-Google-Smtp-Source: AGHT+IGUxvR3dq3G60qifRI6PVHETajEsKootO2ru1+Xfc4jo8d5tjxGKYcyD8aWN79xYU5k2ehvJo5X+xP0n2EghkU= X-Received: by 2002:a05:6402:911:b0:55f:e2ee:6bba with SMTP id g17-20020a056402091100b0055fe2ee6bbamr6239847edz.5.1707650198497; Sun, 11 Feb 2024 03:16:38 -0800 (PST) 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 References: <871q9jqphy.fsf@gentoo.org> In-Reply-To: From: Daniel Simionato Date: Sun, 11 Feb 2024 12:16:27 +0100 Message-ID: Subject: Re: [gentoo-dev] RFC: Setting default HOME_MODE in /etc/login.defs To: gentoo-dev@lists.gentoo.org Content-Type: multipart/alternative; boundary="0000000000007b6d6b0611194bfa" X-Archives-Salt: c238ff39-9142-4d90-ae7e-d75d14703380 X-Archives-Hash: a88bebd50f42c66341d47cfdccd8540e --0000000000007b6d6b0611194bfa Content-Type: text/plain; charset="UTF-8" The only previous upstream discussion I was able to find was this on the pkg-shadow-devel: https://marc.info/?l=pkg-shadow-devel&m=167120074926229&w=2( (I don't think the unprivileged container limitation still applies, or at least it doesn't on my user with a 700 /home) I can see the argument for keeping the status quo, but I still think it's better to err on the side of caution with default settings. But I understand that my point of view might be skewed by personal preference or by professional experience, so I appreciate the everyone contributing their opinion. I have opened a PR upstream to start discussion there https://github.com/shadow-maint/shadow/pull/946 . For reference, the concrete use case that put me onto this ( https://github.com/flatcar/Flatcar/issues/1353): provisioning users in Flatcar through ignition (cloud-init like) at first boot time, even if in the same config /etc/login.defs is changed, results in 755 home directories. Some more comments in this PR https://github.com/kubernetes-sigs/image-builder/pull/1400 The original PR that added HOME_MODE also refers generically to user bug reports due to the many ways umask can be overriden: https://github.com/shadow-maint/shadow/pull/208#issue-546914572 Thanks, Daniel Il giorno dom 11 feb 2024 alle ore 11:53 Eray Aslan ha scritto: > On Sun, Feb 11, 2024 at 10:10:13AM +0000, Sam James wrote: > > I'm in favour, although I'd be curious as to why upstream shadow don't > > just set it. It would be interesting to see if the discussion already > > happened there at some point (surely it has?) and find out their > > reasoning. (But that's not a blocker for proceeding.) > > I believe it is for historical reasons. Computer networks and terminals > used to be much friendlier places. > > > I want to hear more opinions first though. Thanks for raising this, > > it's been in the back of my head. > > Even though I do not really care either way, what problem exactly are we > trying to solve? Better security is just too vague an argument. I can > see the argument if we were selling to business (*cough*red hat*cough*) > but on the other hand, an argument can also be made for keeping to the > roots of computer networks and their naivete (keep information free and > all that stuff). In this regard, it is telling that only debian and > gentoo keep 022. > > Consider taking it upstream as someone else (ulm?) already mentioned in > the discussion. > > Thanks > -- > Eray > > --0000000000007b6d6b0611194bfa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The only previous upstream d= iscussion I was able to find was this=20 on the pkg-shadow-devel:=20 https://marc.info/?l=3Dpkg-shadow-devel&m=3D167120074926229= &w=3D2(
(I don't think the unprivileged container limi= tation still applies, or at least it doesn't on my user with a 700 /hom= e)

I can see the argument for keeping the status quo, but I st= ill think it's better to err on the side of caution with default settin= gs.
But I understand that my point of view might be skewed by= personal preference or by professional experience, so I appreciate=20 the everyone contributing their opinion.

I have opened a PR up= stream to start discussion there https://github.com/shadow-maint/shadow/pull/946 .
=
For reference, the concrete use case that put me onto this (https://github.com/fl= atcar/Flatcar/issues/1353): provisioning users in Flatcar through ignit= ion (cloud-init like) at first boot time, even if in the same config /etc/l= ogin.defs is changed, results in 755 home directories. Some more comments i= n this PR https://github.com/kubernetes-sigs/image-builder/pull/1400
The original PR that added HOME_MODE also refers generically to user= bug reports due to the many ways umask can be overriden: https://github.c= om/shadow-maint/shadow/pull/208#issue-546914572

Thanks,
=C2=A0Daniel


Il giorno dom 11 feb= 2024 alle ore 11:53 Eray Aslan <eras= @gentoo.org> ha scritto:
On Sun, Feb 11, 2024 at 10:10:13AM +0000, Sam James wrote:<= br> > I'm in favour, although I'd be curious as to why upstream shad= ow don't
> just set it. It would be interesting to see if the discussion already<= br> > happened there at some point (surely it has?) and find out their
> reasoning. (But that's not a blocker for proceeding.)

I believe it is for historical reasons. Computer networks and terminals
used to be much friendlier places.

> I want to hear more opinions first though. Thanks for raising this, > it's been in the back of my head.

Even though I do not really care either way, what problem exactly are we trying to solve? Better security is just too vague an argument. I can
see the argument if we were selling to business (*cough*red hat*cough*)
but on the other hand, an argument can also be made for keeping to the
roots of computer networks and their naivete (keep information free and
all that stuff). In this regard, it is telling that only debian and
gentoo keep 022.

Consider taking it upstream as someone else (ulm?) already mentioned in
the discussion.

Thanks
--
Eray

--0000000000007b6d6b0611194bfa--