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,Jaco Kroon <jaco@uls.co.za>
Subject: Re: [gentoo-dev] dynamic groups and users
Date: Fri, 02 Aug 2019 09:53:56 +0000	[thread overview]
Message-ID: <EDACAA56-F1B3-4103-9692-E4B65BEB9371@gentoo.org> (raw)
In-Reply-To: <2a95f00b-f195-5ed9-3737-886e68039da9@uls.co.za>

Dnia August 2, 2019 9:14:56 AM UTC, Jaco Kroon <jaco@uls.co.za> napisał(a):
>Thank you Michał, much appreciated.
>
>I've in the meantime to make progress on my side picked something which
>
>was not in use in ::gentoo, so I can move forward, but it's be really 
>good to have the below feature anyway going forward.
>
>On 2019/08/01 22:47, Michał Górny wrote:
>> On Thu, 2019-08-01 at 21:04 +0200, Jaco Kroon wrote:
>>> Hi,
>>>
>>> Looking at the new eclasses for acct-user and acct-group.
>>>
>>> These enforce that a group and user id should be set.
>>>
>>> This is not a requirement for enewuser nor enewgroup.
>>>
>>> As a further discrepancy, the user eclass requires >0 for the IDs,
>>> whereas the checks in acct-user and acct-group is for >= 0.
>>>
>>> Would it be ok to suggest that we allow -1 (or 0, but that could be
>>> confused with the root user/group) in acct-user and acct-group to
>>> specify "no specific id, please allocate dynamically"?
>>>
>>> Use case:  I'm building some experimental packages in an overlay,
>and I
>>> really don't care what the UID and GID values are, I just need
>something
>>> unique on the host I can use to avoid running the service as root.
>>> Guessing I could just manually useradd -r but then again ... if I do
>>> later submit these into the main tree (or other packages) then it
>>> becomes a problem, and maintaining acct-{user,group}/* outside of
>main
>>> tree could conflict with main tree at a later stage ... either way,
>>> having some way to say "I honestly don't care, just give me a random
>>> number" is probably a good thing.
>>>
>> I'll look into adding support for '-1' in a few days.  However, I'm
>> going to add QA checks to prevent it from getting into ::gentoo
>first.
>
>Assuming I understand that correctly, you're happy with -1 values going
>
>into overlays, but not into ::gentoo?

Yes.

>
>Would you mind to explain the motivation for that?

Assignments are now required by policy. We really want to support at least some of the weird use cases people requested over the time, that requires uids/gids in sync. Even though you are probably right that there are users and groups that would never make real use of that, I don't think it's worthwhile to try to make the policy more complex (and potentially breaking for some obscure uses) for no real benefit.

>
>I'm also happy to take a whack at generating a patch series for you for
>
>the eclasses themselves (not familiar with the QA check code yet), 
>including sorting out the >0 vs >=0 discrepancy, if you're happy with
>that?

Sure. Please preferably address two of them separately, so we can commit the 0 patch first, and -1 when CI is ready.

>
>Kind Regards,
>Jaco


--
Best regards, 
Michał Górny


  reply	other threads:[~2019-08-02  9:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01 19:04 [gentoo-dev] dynamic groups and users Jaco Kroon
2019-08-01 20:01 ` Mike Gilbert
2019-08-01 20:22   ` Jaco Kroon
2019-08-02 16:33   ` Mike Gilbert
2019-08-01 20:47 ` Michał Górny
2019-08-02  9:14   ` Jaco Kroon
2019-08-02  9:53     ` Michał Górny [this message]
2019-08-02 15:46       ` Michael Orlitzky
2019-08-02 15:58         ` Michał Górny
2019-08-02 16:24           ` Michael Orlitzky
2019-08-02 17:06             ` Michał Górny
2019-08-04 16:22               ` Jaco Kroon
2019-08-06 11:41                 ` Jaco Kroon
2019-08-07 15:48                   ` Michał Górny
2019-08-08  6:52                     ` Jaco Kroon
2019-08-08  8:42                     ` Ulrich Mueller
2019-08-08 10:04                       ` Jaco Kroon
2019-08-03  0:53             ` James Cloos
2019-08-17 20:38 ` Michał Górny

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=EDACAA56-F1B3-4103-9692-E4B65BEB9371@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=jaco@uls.co.za \
    /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