From: Lennart Poettering Date: Mon, 14 Feb 2022 16:22:27 +0000 (+0100) Subject: coredump: fix inode check X-Git-Tag: v251-rc1~294^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c20c77eff8ef1a76ef5aea02df7121507bf9be69;p=thirdparty%2Fsystemd.git coredump: fix inode check 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. --- diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index aac75dc5525..6055b91acbd 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -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; }