uid-classification: properly classify *all* container UIDs
authorLennart Poettering <lennart@poettering.net>
Fri, 8 Nov 2024 10:50:15 +0000 (11:50 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 8 Nov 2024 23:18:39 +0000 (23:18 +0000)
commit56933f2073b37ffb939a69f9f441f26c624a81bd
tree8b156377903c560abd75b5cf4f91f23a3e58c4c8
parent347def981b9861f508af663cbffffaff4e6df3c4
uid-classification: properly classify *all* container UIDs

A bit confusingly CONTAINER_UID_BASE_MAX is just the maximum *base* UID
for a container. Thus, with the usual 64K UID assignments, the last
actual container UID is CONTAINER_UID_BASE_MAX+0xFFFF.

To make this less confusing define CONTAINER_UID_MIN/MAX that add the
missing extra space.

Also adjust two uses where this was mishandled so far, due to this
confusion.

With this change the UID ranges we default to should properly match what
is documented on https://systemd.io/UIDS-GIDS/.
src/basic/uid-classification.h
src/home/homework-mount.c
src/userdb/userdbctl.c