[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36508: [DRAFT PATCH] Stable allocation of uids, by keeping a histori
From: |
Maxime Devos |
Subject: |
bug#36508: [DRAFT PATCH] Stable allocation of uids, by keeping a historical mapping. |
Date: |
Sun, 18 Sep 2022 14:22:36 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 |
Hi,
The attached patch maintains a historical mapping from user names to
UIDs/GIDs (even when those users are removed from the user accounts), to
solve <https://issues.guix.gnu.org/36508>, as proposed by Mark H Weaver
in <https://issues.guix.gnu.org/36508#10>.
(The proposed garbage collector is not included, however.)
As I proposed in <https://issues.guix.gnu.org/36508#14>, the information
of this mapping is kept in a special 'user'. However, I didn't
implement the same for groups (raises some questions about atomicity --
/etc/passwd and /etc/groups are separate files).
I didn't completely follow that proposal though, since:
> https://issues.guix.gnu.org/36508#16:
> Problem is that things like GDM would still propose those old accounts
> (unless maybe their password is uninitialized, I’m not sure; but it’s
> still hacky.)
, though that could perhaps be solved by adjusting GDM appropriately.
"make check TESTS=tests/accounts.scm" passes, but otherwise the patch is
rather untested (hence, 'DRAFT') -- the new functionality will need a
few additional tests in tests/account.scm, to avoid introducing bugs in
the handling of /etc/passwd.
On second thought, a separate /etc/previous-uids (as proposed in
<https://issues.guix.gnu.org/36508#16> by Ludovic Courtès)
might be better (there are atomicity issues anyway, due to /etc/passwd
and /etc/groups being separate files, and losing the historical mapping
is relatively harmless and seems unlikely to happen in practice).
Greetings,
Maxime
0001-DRAFT-Stable-allocation-of-uids.patch
Description: Text Data
OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#36508: [DRAFT PATCH] Stable allocation of uids, by keeping a historical mapping.,
Maxime Devos <=