]> git.ipfire.org Git - thirdparty/systemd.git/commit
machined: when reading os-release file, join PID namespace too
authorLennart Poettering <lennart@poettering.net>
Mon, 12 Nov 2018 22:40:09 +0000 (23:40 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 13 Nov 2018 09:49:18 +0000 (10:49 +0100)
commit2bb21fc9288100e12f3dc1a0ede1e8487f7f5223
tree65ea03576b337d28728f211011197263892c02a0
parent0a885dd055d30200021f7de188e2228c4d824518
machined: when reading os-release file, join PID namespace too

This is required for /proc/self/fd/xyz to work, but that's what we need
to convert the O_PATH fd returned by chase_symlinks() back to a regular
file fd. Hence, let's do the joining of the namespaces fully and
correctly, by doing fork()+setns()+fork() with the PID and fs
namespaces.

This makes use of the new namespace_fork() helper we just added.

Fixes: #10549
src/machine/machine-dbus.c