]> git.ipfire.org Git - thirdparty/systemd.git/commit
journalctl: show coredumps again when --unit= is specified
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 6 Dec 2024 19:08:59 +0000 (04:08 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 9 Dec 2024 14:18:55 +0000 (15:18 +0100)
commitfbee22c2373db393f796fb2942ecbb5fa4ddbeb7
treedd1cea6edfc899ba720f7caf48e10ef3b71855dc
parent9cbd4f9b612e4020ca1c12aad9912b2cfd161842
journalctl: show coredumps again when --unit= is specified

This is a revised version of cbd5f5d7d6d652d52a18170123f5d08baf7e9862,
which is reverted by 560412148fa62d779ea522d43960dd3acd44b261.

The filter condition for _UID= field was added by
fdcd37df3b97abc381c7b7a29b81cc013c7a3230. However, after
888e378da2dbf4520e68a9d7e59712a3cd5a830f, coredumps for system services are
stored by systemd-coredump user. Hence, _UID=0 does not match anything anymore.

When we are reading the system journal, let's set _UID=<systemd-coredump>,
then we can show coredumps for system services again. When we are reading
an external journal, then the uid of systemd-coredump may be different
from the one on the current system, so let's drop the filter condition
for _UID= in that case.
src/journal/journalctl-filter.c
src/shared/logs-show.c
src/shared/logs-show.h