summaryrefslogtreecommitdiff
path: root/src/coredump
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-02-14 17:22:27 +0100
committerLennart Poettering <lennart@poettering.net>2022-02-14 17:27:21 +0100
commitc20c77eff8ef1a76ef5aea02df7121507bf9be69 (patch)
tree780ff50d06c34a2eee9fb61ca8de70e09a97ad00 /src/coredump
parent675e7fc22c7ab45bf9f4a4414bf7c87734a00d15 (diff)
downloadsystemd-c20c77eff8ef1a76ef5aea02df7121507bf9be69.tar.gz
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.
Diffstat (limited to 'src/coredump')
-rw-r--r--src/coredump/coredump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c
index aac75dc552..6055b91acb 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;
}