Hi,

Maxime Devos <maximede...@telenet.be> skribis:

>> (gnu build accounts) is stateful in that it makes sure UIDs aren’t
>> reused.  (This is roughly the same algorithm as used by Shadow.)
>
> It doesn't?  AFAICT it only takes /etc/passwd and /etc/groups in
> account and there was some bug report reusing uids in system accounts
> after removing a service (something about tor and gdm?), adding another
> service and re-adding the original service or something like that.

I’m not sure what the conclusion of those bug reports were, but (gnu
build accounts) doesn’t reuse UIDs: you can see that in
‘user+group-databases’, which reads the initial /etc/{passwd,group}, and
passes them to ‘allocate-passwd’ and ‘allocate-group’, which “reserve”
those initial UIDs/GIDs.

This is exercised in tests/accounts.scm (search for “no reuse”).

There could be bugs of course, but in that case we should fix them.  :-)

Ludo’.

Reply via email to