]> git.ipfire.org Git - thirdparty/systemd.git/commit
mountfsd: Always open_tree() in mount namespace of peer
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 24 Jan 2026 19:52:14 +0000 (20:52 +0100)
committerDaan De Meyer <daan@amutable.com>
Thu, 5 Feb 2026 14:16:29 +0000 (15:16 +0100)
commitb4bfacf4960665ddc9db00f04090615a946cb860
tree69be2c4000030704ebd9f48ca4ab8692e7b47af4
parent4de6855171b6d33b2116ad5e48f23bcd36c9e439
mountfsd: Always open_tree() in mount namespace of peer

open_tree() will fail with EINVAL when passed a directory file descriptor
that comes from another mount namespace. While this should be fixed in a
future kernel, let's workaround the issue for now by entering the mount
namespace of the peer if needed and calling open_tree() there and then
passing the fd back to the mountfsd process.
src/mountfsd/mountwork.c