Files
systemd/src/core
Ryan Wilson 705cc82938 core: Add PrivateUsers=full
Recently, PrivateUsers=identity was added to support mapping the first
65536 UIDs/GIDs from parent to the child namespace and mapping the other
UID/GIDs to the nobody user.

However, there are use cases where users have UIDs/GIDs > 65536 and need
to do a similar identity mapping. Moreover, in some of those cases, users
want a full identity mapping from 0 -> UID_MAX.

Note to differentiate ourselves from the init user namespace, we need to
set up the uid_map/gid_map like:
```
0 0 1
1 1 UINT32_MAX - 1
```

as the init user namedspace uses `0 0 UINT32_MAX` and some applications -
like systemd itself - determine if its a non-init user namespace based on
uid_map/gid_map files. Note systemd will remove this heuristic in
running_in_userns() in version 258 and uses namespace inode. But some users
may be running a container image with older systemd < 258 so we keep this
hack until version 259.

To support this, we add PrivateUsers=full that does identity mapping for
all available UID/GIDs.

Fixes: #35168
2024-12-05 10:34:32 -08:00
..
2024-11-05 05:32:02 -08:00
2024-10-09 06:57:11 +09:00
2024-06-28 18:51:56 +02:00
2024-12-05 10:34:32 -08:00
2024-11-05 05:32:02 -08:00
2023-10-19 10:05:20 +01:00
2024-10-02 18:29:43 +02:00
2024-10-02 18:29:43 +02:00
2024-06-19 16:22:23 +02:00
2024-04-18 17:39:34 +02:00
2024-11-05 05:32:02 -08:00
2024-11-05 05:32:02 -08:00
2024-11-05 05:32:02 -08:00
2024-10-02 18:29:43 +02:00
2024-12-05 10:34:32 -08:00
2024-12-05 10:34:32 -08:00
2024-03-20 15:18:21 +01:00