]> git.ipfire.org Git - thirdparty/lxc.git/commit
meson: Add optional landlock protection for monitor
authorStéphane Graber <stgraber@stgraber.org>
Sat, 30 Aug 2025 03:50:00 +0000 (03:50 +0000)
committerStéphane Graber <stgraber@stgraber.org>
Sun, 31 Aug 2025 21:50:04 +0000 (17:50 -0400)
commitbfacedd4cd5006409d14b60c651a8588451376c1
treee5392cca58478779a94a8e35f3b514d7a1caf597
parent694944a7e598692004326d7888cee765da445719
meson: Add optional landlock protection for monitor

This introduces a new optional security feature to the LXC monitor process.

With this enabled, the monitor API used for communication between the
CLI (or other clients) and the container monitor will now run in a
dedicated thread and have a Landlock policy applied to that thread.

The thread trick is required as the monitor process is also responsible
for running post-stop tasks (hooks) which need full privileges as well
as also handling full container reboots which similarly require full
privileges.

The policy is pretty simple at this point. It allows access to /dev/pts,
/dev/ptmx and /sys/fs/cgroup as those are the few paths that the monior
actually needs to open (as opposed to just handing out existing
filedescriptors).

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
meson.build
meson_options.txt