public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alec Warner <antarus@gentoo.org>
To: Ulrich Mueller <ulm@gentoo.org>
Cc: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] rfc: allow -1 for ACCT_USER_ID and ACCT_GROUP_ID in ::gentoo
Date: Mon, 29 Nov 2021 16:55:45 -0800	[thread overview]
Message-ID: <CAAr7Pr8-+LkU4GvCKUUr257Wd9n0R+KjZc2c7WSAD2nE+uwOwQ@mail.gmail.com> (raw)
In-Reply-To: <w6gmtlntg26.fsf@kph.uni-mainz.de>

On Mon, Nov 29, 2021 at 2:25 AM Ulrich Mueller <ulm@gentoo.org> wrote:
>
> >>>>> On Mon, 29 Nov 2021, Alec Warner wrote:
>
> > - If Gentoo adds an acct-user/foo user, and that user already exists
> > on my system with the wrong UID: the eclass dies[0].
>
> I don't think that's correct. The eclass will just use the already
> existing UID then (except for the very few acct-user packages that
> define ACCT_USER_ENFORCE_ID).
>
> > - If Gentoo adds an acct-user/foo user, with uid=12345, and that uid
> > is assigned to a user on my system already, the eclass dies.
>
> Similar to above, the eclass will dynamically allocate another UID that
> is free.

Oh good I misread it, you are right; my apologies.

>
> > - Some environments are very old, and so real users have unexpected
> > uids; this includes Gentoo itself.
> >    - Gentoo (the community) used to allocate UIDs to devs in the
> > 500-1000 range and we have 17 active developers with UIDs in that
> > range. So for example if we allocate one of these UIDs to an acct-*
> > package; that package will not be installable on woodpecker without
> > modification because those UIDs are already taken.
>
> See above.
>
> Also, why would one allocate UIDs in the 500..999 range (1000 is fine,
> actually)? Gentoo always had UID_MIN=1000 and SYS_UID_MAX=999.

A bunch of reasons.
 - In the case of gentoo.org specifically I am guessing bugs and / or
ignorance (as we discussed on IRC.) enewuser / useradd / the normal
utilities lack the permissions to add users (because they cannot write
to LDAP without credentials) and so currently we have a tool
(perl_ldap); from 2006 onward it looks for the highest uidNumber in
LDAP and adds 1 to it. I don't have the source code for earlier
versions, but code comments implied the uids were entered by people;
not machines. People are really bad at consistently allocating UIDs
and are bad at following standards :)
 - In my previous work, the uid automation would routinely have bugs
(we did not have good unit or functional testing) and often the uid
range requirements were either not implemented (oops) or were buggy
(also oops.) We often fixed weird bugs by hand (if we noticed that
e.g. an account had some weird problem and it was someone's first day;
redoing their account is cheap.) But if the bug was in the past; it
was often too expensive to fix anything; so our user accounts had many
exciting quirks of names, odd assignments, etc.

This is why I say that conceptually the 'identity provider' is
external to Gentoo (because we all have our weird site-specific
quirks.) As you note above though, most acct-* packages will not break
and will just assign some other uid / gid; so only the FORCE_ID
packages matter and there are only 3 of those...so I mostly concede on
that basis provided we avoid adding more FORCE'd packages.

-A

>
> Ulrich


      parent reply	other threads:[~2021-11-30  0:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-28 22:31 [gentoo-dev] rfc: allow -1 for ACCT_USER_ID and ACCT_GROUP_ID in ::gentoo William Hubbs
2021-11-28 23:26 ` Michael Orlitzky
2021-11-28 23:39   ` Sam James
2021-11-29  0:06     ` Michael Orlitzky
2021-11-29  5:05       ` Sam James
2021-11-29 13:25         ` Michael Orlitzky
2021-11-29  4:07 ` Michał Górny
2021-11-29  6:58   ` Alec Warner
2021-11-29 10:24     ` Ulrich Mueller
2021-11-30  0:49       ` James Cloos
2021-11-30 11:59         ` Ulrich Mueller
2021-11-30 21:08           ` James Cloos
2021-12-01  1:32           ` William Hubbs
2021-12-01  1:42             ` Michael Orlitzky
2021-12-01  6:16             ` Jaco Kroon
2021-12-01  6:45               ` Alec Warner
2021-12-01  7:51                 ` Jaco Kroon
2021-12-01 12:22                 ` Michael Orlitzky
2021-12-01 16:52             ` A Schenck
2021-11-30  0:55       ` Alec Warner [this message]

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=CAAr7Pr8-+LkU4GvCKUUr257Wd9n0R+KjZc2c7WSAD2nE+uwOwQ@mail.gmail.com \
    --to=antarus@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=ulm@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