1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-18 10:04:04 +03:00
Lennart Poettering fa8b70f2c8
userdb: define new 64K "foreign UID" range (#35932)
This is establish the basic concepts for #35685, in the hope to get this
merged first.

This defines a special, fixed 64K UID range that is supposed to be used
by directory container images on disk, that is mapped to a dynamic UID
range at runtime (via idmapped mounts).

This enables a world where each container can run with a dynamic UID
range, but this in no way leaks onto the disk, thus making supposedly
dynamic, transient UID range assignments persistent.

This is infrastructure later used for the primary part of #35685: unpriv
container execution with directory images inside user's home dirs, that
are assigned to this special "foreign UID range".

This PR only defines the ranges, synthesizes NSS records for them via
userdb, and then exposes them in a new "systemd-dissect --shift" command
that can re-chown a container directory tree into this range (and in
fact any range).

This comes with docs. But no tests. There are tests in #35685 that cover
all this, but they are more comprehensive and also test nspawn's hook-up
with this, hence are excluded from this PR.
2025-01-10 13:49:11 +01:00
..
2024-12-25 17:00:31 +01:00
2023-12-25 09:15:53 +01:00
2024-11-24 01:11:42 +09:00
2024-11-26 17:28:14 +01:00
2024-12-25 17:00:31 +01:00
2024-12-25 17:00:31 +01:00
2024-12-25 17:00:31 +01:00
2024-12-25 17:00:31 +01:00
2024-12-25 17:00:31 +01:00
2024-12-25 17:00:31 +01:00
2024-12-25 17:00:31 +01:00
2024-12-25 17:00:31 +01:00
2024-11-06 19:06:47 +09:00
2024-12-25 17:00:31 +01:00
2023-12-26 08:59:53 +01:00
2023-12-26 08:59:53 +01:00
2024-12-25 17:00:31 +01:00
2024-11-24 01:11:42 +09:00
2023-12-26 13:10:36 +01:00
2024-11-24 01:11:42 +09:00
2024-11-24 01:11:42 +09:00
2024-11-24 01:11:42 +09:00
2024-12-25 17:00:31 +01:00
2024-11-24 01:11:42 +09:00
2023-12-24 09:32:26 +01:00
2024-12-25 17:00:31 +01:00
2024-11-06 19:06:40 +09:00
2024-12-25 17:00:31 +01:00
2024-12-25 17:00:31 +01:00
2024-11-18 15:18:26 +09:00