]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coredump: fix inode check
authorLennart Poettering <lennart@poettering.net>
Mon, 14 Feb 2022 16:22:27 +0000 (17:22 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 14 Feb 2022 16:27:21 +0000 (17:27 +0100)
When checking if we look at the root directory we actually need to
compare both st_dev *and* st_ino. The existing check only checked the
latter. Fix that.

src/coredump/coredump.c

index aac75dc552588ea162bdc375c4f184da43fffd82..6055b91acbd7a0cf4a3772365eeeabef43fcae38 100644 (file)
@@ -721,7 +721,7 @@ static int get_process_container_parent_cmdline(pid_t pid, char** cmdline) {
                 return -errno;
 
         /* The process uses system root. */
-        if (proc_root_stat.st_ino == root_stat.st_ino) {
+        if (stat_inode_same(&proc_root_stat, &root_stat)) {
                 *cmdline = NULL;
                 return 0;
         }