]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/namespace.c
core/namespace: reimplement mount_private_sysfs() in the same logic to mount private...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 10 Aug 2023 04:58:54 +0000 (13:58 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 22 Aug 2023 14:21:43 +0000 (23:21 +0900)
commit553e3660864c657cbfca805d49cbe9f097df4558
treed1a44b4793044afaaad1081cfc2d66adebbfacd0
parentcc7e2dff7eec8305d582802979febd4ce662a083
core/namespace: reimplement mount_private_sysfs() in the same logic to mount private procfs

Previously, mount_private_sysfs() was implemented by using open_tree()
and move_mount() to keep submounts. But these syscalls are slightly new
and supported since kernel version 5.2.

We already do the same thing for /proc/, but without the new syscalls.
Let's use the same logic to mount private procfs. Then, we can mount
new instance of sysfs with older kernels.
src/core/namespace.c