Skip to content

Conversation

stgraber
Copy link
Member

We shouldn't just rely on the process name but also make sure that it's running outside of the container as this is a unique characteristic of the real monitor process.

We shouldn't just rely on the process name but also make sure that it's
running outside of the container as this is a unique characteristic of
the real monitor process.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
tomponline added a commit to canonical/lxd that referenced this pull request Jul 17, 2025
…Incus) (#16047)

When a process inside a container accesses `/dev/lxd` LXD will now check
the `NSpid` status variable of each candidate monitor process to confirm
the process has no PIDs in other namespaces. If it does then it can't be
the LXC monitor process, even if it has "[lxc monitor]" in its process
name.

Inspired by ideas from lxc/incus#2285
@stgraber stgraber merged commit bf5502a into lxc:main Jul 17, 2025
128 of 140 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants