Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] dynamic groups and users
Date: Thu, 01 Aug 2019 20:47:39
Message-Id: 0797f90fd71fdcf9b1c3632f54d3ddf8f3ebddc1.camel@gentoo.org
In Reply to: [gentoo-dev] dynamic groups and users by Jaco Kroon
1 On Thu, 2019-08-01 at 21:04 +0200, Jaco Kroon wrote:
2 > Hi,
3 >
4 > Looking at the new eclasses for acct-user and acct-group.
5 >
6 > These enforce that a group and user id should be set.
7 >
8 > This is not a requirement for enewuser nor enewgroup.
9 >
10 > As a further discrepancy, the user eclass requires >0 for the IDs,
11 > whereas the checks in acct-user and acct-group is for >= 0.
12 >
13 > Would it be ok to suggest that we allow -1 (or 0, but that could be
14 > confused with the root user/group) in acct-user and acct-group to
15 > specify "no specific id, please allocate dynamically"?
16 >
17 > Use case: I'm building some experimental packages in an overlay, and I
18 > really don't care what the UID and GID values are, I just need something
19 > unique on the host I can use to avoid running the service as root.
20 > Guessing I could just manually useradd -r but then again ... if I do
21 > later submit these into the main tree (or other packages) then it
22 > becomes a problem, and maintaining acct-{user,group}/* outside of main
23 > tree could conflict with main tree at a later stage ... either way,
24 > having some way to say "I honestly don't care, just give me a random
25 > number" is probably a good thing.
26 >
27
28 I'll look into adding support for '-1' in a few days. However, I'm
29 going to add QA checks to prevent it from getting into ::gentoo first.
30
31 --
32 Best regards,
33 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] dynamic groups and users Jaco Kroon <jaco@××××××.za>