From 9ed2725867bb1e4248fc0fadcb697d49c76f8bd2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 6 Jan 2025 17:19:34 +0100 Subject: [PATCH] process-util: a process from a foreign pidns is definitely not our child Addresses: https://github.com/systemd/systemd/pull/35242#pullrequestreview-2531712318 --- src/basic/process-util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/basic/process-util.c b/src/basic/process-util.c index 53ac2717e38..e3c696a3a6c 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -1096,6 +1096,8 @@ int pidref_is_my_child(const PidRef *pid) { pid_t ppid; r = pidref_get_ppid(pid, &ppid); + if (r == -EADDRNOTAVAIL) /* if this process is outside of our pidns, it is definitely not our child */ + return false; if (r < 0) return r; -- 2.47.3