]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: Support idmapped mounts on homed managed home directories (#38069)
authorLennart Poettering <lennart@poettering.net>
Tue, 8 Jul 2025 04:51:41 +0000 (06:51 +0200)
committerGitHub <noreply@github.com>
Tue, 8 Jul 2025 04:51:41 +0000 (06:51 +0200)
commit18eafedb1aa7647dc2348c09dd7a4a3584e8c175
tree0fdd933d27045dc692073a397dfc9d40a355afc1
parent0d8f8be2fd752093b5f22d92ba49534c819346be
parent90fa161b5ba29d58953e9f08ddca49121b51efe6
nspawn: Support idmapped mounts on homed managed home directories (#38069)

Christian made this possible in Linux 6.15 with a new system call
open_tree_attr() that combines open_tree() and mount_setattr(). Because
idmapped mounts are (rightfully) not nested, we have to do some extra
shenanigans to make source we're putting the right source uid in the
userns for any idmapped mounts that we do in nspawn.

Of course we also add the necessary boilerplate to make open_tree_attr()
available in our code and wrap open_tree_attr() and the corresponding
fallback in a new function which we then use everywhere else.