Hi,

I have opened a merge request implementing this, following the decisions
Marc took in this log:

    https://salsa.debian.org/debian/adduser/-/merge_requests/144

adduser now keeps the highest uid and gid it has handed out in a reserved
@global record in /var/lib/adduser/state, and does not hand an id to a new
account if it has already been used once. The counter is written inside the
existing lock and only when the run succeeds.

--uid and --gid do not take part in the counter, and a range given on the
command line (--firstuid and friends) suspends it: the account gets the first
free id of that range and the counter is neither read nor written. The range
configured in adduser.conf does not count as explicit, since that is just the
normal range of the system.

Two new settings, both documented in adduser.conf(5): REUSE_IDS (default no)
restores the previous behaviour, and ID_COUNTER_INIT (first_free|highest,
default first_free) decides where the counter starts on a system that does not
have one yet.

There is a new autopkgtest file with 69 assertions for this. Three existing
test files still expect ids to be re-used; that is discussed in the merge
request.

Regards,

--  
[o]---[o]---[o]
 | \   |   / |      Juan Muñoz <[email protected]>
[o]---[*]---[o]     Building things the universe didn't ask for.
 | /   |   \ |      Tor relay operator· RIPE Atlas probe
[o]---[o]---[o]     OONI Probe · salsa.debian.org/juaesm

Reply via email to