From: Lennart Poettering Date: Mon, 6 Jan 2025 16:19:34 +0000 (+0100) Subject: process-util: a process from a foreign pidns is definitely not our child X-Git-Tag: v258-rc1~1690 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9ed2725867bb1e4248fc0fadcb697d49c76f8bd2;p=thirdparty%2Fsystemd.git process-util: a process from a foreign pidns is definitely not our child Addresses: https://github.com/systemd/systemd/pull/35242#pullrequestreview-2531712318 --- 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;