public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: chewi@gentoo.org
Subject: Re: [gentoo-dev] RFC: Setting default HOME_MODE in /etc/login.defs
Date: Sun, 11 Feb 2024 14:08:27 +0100	[thread overview]
Message-ID: <4cf02e385829b6e72c6bcd33665ad17d89d2b475.camel@gentoo.org> (raw)
In-Reply-To: <878r3rqpkz.fsf@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]

On Sun, 2024-02-11 at 10:06 +0000, Sam James wrote:
> Michael Orlitzky <mjo@gentoo.org> writes:
> 
> > 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 default in
> > > the /etc/login.defs file (owned by sys-apps/shadow package).
> > > 
> > > Upstream keeps HOME_MODE commented:
> > > https://github.com/shadow-maint/shadow/blob/3e59e9613ec40c51c19c7bb5c28468e33a4529d5/etc/login.defs#L207
> > > 
> > > HOME_MODE affects only useradd and newuser commands: if HOME_MODE is set,
> > > they will use the specified permission when creating a user home directory,
> > > otherwise the default UMASK will be used.
> > > Since the default umask is 022, keeping HOME_MODE unset will result in home
> > > readable home direct
> > 
> > umask 022 is also egregious, changing it to 027 would kill two birds.
> > But in lieu of that, yes.
> 
> 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/.
> 
> 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.

-- 
Best regards,
Michał Górny


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

  reply	other threads:[~2024-02-11 13:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-10 16:57 [gentoo-dev] RFC: Setting default HOME_MODE in /etc/login.defs Daniel Simionato
2024-02-10 23:52 ` John Helmert III
2024-02-11  1:08   ` Alex Boag-Munroe
2024-02-11  2:01 ` Michael Orlitzky
2024-02-11 10:06   ` Sam James
2024-02-11 13:08     ` Michał Górny [this message]
2024-02-11  2:12 ` Eli Schwartz
2024-02-11  2:20   ` Alex Boag-Munroe
2024-02-11  8:00 ` Ulrich Mueller
2024-02-11  9:33   ` James Le Cuirot
2024-02-11 10:10 ` Sam James
2024-02-11 10:53   ` Eray Aslan
2024-02-11 11:16     ` Daniel Simionato
     [not found]   ` <0ca8c68f-11e3-4a68-a857-bfd040e6b084@iodoru.org>
2024-02-13 20:01     ` Daniel Simionato
2024-02-11 13:37 ` Arsen Arsenović

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4cf02e385829b6e72c6bcd33665ad17d89d2b475.camel@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=chewi@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox