coredump: fixed bug - some coredump temp files could be lost

If the machine was suddenly shutted down (hard reboot for example) while
processing core dump, temp files created manually (not with a O_TEMPFILE flag)
stay in the system. After reboot systemd-coredump treat them as usual files, so
they wouldn't be rotated and shall pollute the filesystem.

Solution is to simply add those temp files to systemd-tmpfiles configs.
This commit is contained in:
Krayushkin Konstantin 2019-05-31 11:16:17 +03:00 committed by Lennart Poettering
parent 79e68937d3
commit aae3c9a075
1 changed files with 5 additions and 0 deletions

View File

@ -16,3 +16,8 @@ X /var/tmp/systemd-private-%b-*/tmp
# Remove top-level private temporary directories on each boot
R! /tmp/systemd-private-*
R! /var/tmp/systemd-private-*
# Handle lost systemd-coredump temp files. They could be lost on old filesystems,
# for example, after hard reboot.
x /var/lib/systemd/coredump/.#core*.%b*
r! /var/lib/systemd/coredump/.#*