]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
process-util: a process from a foreign pidns is definitely not our child
authorLennart Poettering <lennart@poettering.net>
Mon, 6 Jan 2025 16:19:34 +0000 (17:19 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 7 Jan 2025 07:55:21 +0000 (08:55 +0100)
Addresses: https://github.com/systemd/systemd/pull/35242#pullrequestreview-2531712318

src/basic/process-util.c

index 53ac2717e38124bc55ee517f7fd8532e5c2ea6ff..e3c696a3a6c7d398fbc380525cdaa5df70a6b6c4 100644 (file)
@@ -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;