diff options
author | Krayushkin Konstantin <kkrayushkin@lintech.ru> | 2019-05-31 10:16:17 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-05-31 12:57:35 +0200 |
commit | aae3c9a0753d32cbc366e7834cb29c2b7e2c8fcf (patch) | |
tree | 6659df6f3baf32e42bee7d025c91f7ef3f621469 /tmpfiles.d/systemd-tmp.conf | |
parent | Merge pull request #12707 from yuwata/test-network-lsan-options (diff) | |
download | systemd-aae3c9a0753d32cbc366e7834cb29c2b7e2c8fcf.tar.xz systemd-aae3c9a0753d32cbc366e7834cb29c2b7e2c8fcf.zip |
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.
Diffstat (limited to 'tmpfiles.d/systemd-tmp.conf')
-rw-r--r-- | tmpfiles.d/systemd-tmp.conf | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tmpfiles.d/systemd-tmp.conf b/tmpfiles.d/systemd-tmp.conf index beb77dd0e0..d47d468fba 100644 --- a/tmpfiles.d/systemd-tmp.conf +++ b/tmpfiles.d/systemd-tmp.conf @@ -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/.#* |