Gentoo Archives: gentoo-dev

From: Tom Wijsman <TomWij@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: Namespace for users created for packages
Date: Wed, 26 Mar 2014 14:10:41
Message-Id: 20140326151008.5de62b06@gentoo.org
In Reply to: [gentoo-dev] RFC: Namespace for users created for packages by Michal Hrusecky
1 On Wed, 26 Mar 2014 14:32:58 +0100
2 Michal Hrusecky <miska@g.o> wrote:
3
4 > Many packages need to add user and group names for their unprivileged
5 > daemons. Many names are short for convenience, e.g. 'pop', 'vdr',
6 > 'tor' or 'znc'. Since there is no separate name space for system
7 > users those names may collide with names of real persons. Sharing a
8 > user name between a system user and a normal user leads to surprising
9 > or even security relevant misbehavior as the daemon user may write to
10 > files in the real user's home or vice versa.
11 >
12 > Conclusion, in short, is to prefix system users (with some exceptions
13 > like root or nobody) with underscore '_'. So you would get users like
14 > '_pop', '_vdr', '_tor' or '_znc'. OpenBSD already does that[3].
15 > openSUSE proposal with more details can be seen on GitHub[4].
16 >
17 > So the question is, what would you think about such a policy in
18 > Gentoo?
19 >
20 > [1] http://lists.opensuse.org/opensuse-factory/2014-03/msg00333.html
21 > [2] http://lists.opensuse.org/opensuse-packaging/2014-02/msg00136.html
22 > [3]
23 > http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/infrastructure/db/user.list?rev=HEAD;content-type=text%2Fplain
24 > [4]
25 > https://github.com/lnussel/osep_opensuse_usernames/blob/master/opensuse_usernames.txt
26
27 +1, it also helps spot the difference between normal users and those
28 that were made by the system; eg. `grep -v ^_ /etc/passwd` to only
29 quickly only list normal users there (while you have 'added by
30 portage' in this case you might not have that available in other cases).
31
32 --
33 With kind regards,
34
35 Tom Wijsman (TomWij)
36 Gentoo Developer
37
38 E-mail address : TomWij@g.o
39 GPG Public Key : 6D34E57D
40 GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D