public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michael Orlitzky <mjo@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] RFC: GLEP81 home directory guidelines
Date: Sat, 17 Aug 2019 10:48:35 -0400	[thread overview]
Message-ID: <8d6a772c-c580-d6c7-1b5d-153c918de579@gentoo.org> (raw)
In-Reply-To: <w6gwofcjijy.fsf@kph.uni-mainz.de>

On 8/17/19 4:35 AM, Ulrich Mueller wrote:
> 
>>   2 No two acct-user packages should define the same ACCT_USER_HOME.
> 
> These two points are not fulfilled by the users that currently belong
> to baselayout. For example, "operator" (and "toor" on BSD) share /root
> with the root user.
> 

Let me first say that I've called these "guidelines" and not "rules" for
a reason. If there's a legitimate reason to ignore one of them, then so
be it.

For "toor", it might make sense to leave its home directory as-is. It
shares the same UID as "root", so the bit about clobbering permissions
doesn't apply.

The "operator" user on the other hand, is an anachronism. It's unable to
log in by default, and I'll bet we could simply delete it from
baselayout and no one would notice. Less zealously, we could leave its
home directory at the default: /root will be unusable anyway (see below
about $HOME being unwritable).


>>   5 As a corollary of the previous item, it is highly suspicious for
>>     an acct-user package to set ACCT_USER_HOME_OWNER="root:root".
> 
> Again, points 4 and 5 won't be true for several of baselayout's users.
> For example, "nobody" lives in /var/empty but cannot write to it, and
> that dir is owned by root.

"The fact that the home directory is not writable suggests that the
default (empty) ACCT_USER_HOME would suffice instead."

Would it?


> Same for the "sshd" user, which IIRC chroots to /var/empty, but must
> not (be able to) write to that dir.

It chroots to /var/empty, but does it chroot to $HOME? The ebuild passes

  --with-privsep-path="${EPREFIX%/}"/var/empty

to the build.

I see that on newer installs the "sshd" user now has /var/empty as its
home directory. But the machine I'm typing this on had Gentoo installed
on it in 2004, and sshd's home directory is set to /dev/null. And as far
as I know, everything's fine.

So, same question: would the default (empty) ACCT_USER_HOME suffice instead?


  reply	other threads:[~2019-08-17 14:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-16 22:40 [gentoo-dev] RFC: GLEP81 home directory guidelines Michael Orlitzky
2019-08-17  4:29 ` Haelwenn (lanodan) Monnier
2019-08-17 14:03   ` Michael Orlitzky
2019-08-17  8:35 ` Ulrich Mueller
2019-08-17 14:48   ` Michael Orlitzky [this message]
2019-08-17 18:02   ` Kent Fredric
2019-08-30 13:39   ` Michael Orlitzky

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=8d6a772c-c580-d6c7-1b5d-153c918de579@gentoo.org \
    --to=mjo@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