mirror of
https://github.com/konstruktoid/hardening.git
synced 2026-04-26 17:25:52 +03:00
[GH-ISSUE #170] [BUG] logrotate fails with duplicate log entry for /var/log/{wtmp,btmp} error #66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bob-rove on GitHub (Sep 16, 2022).
Original GitHub issue: https://github.com/konstruktoid/hardening/issues/170
Originally assigned to: @konstruktoid on GitHub.
Describe the bug
/usr/sbin/logrotate /etc/logrotate.confexists with the following error:Worth noting that original issue seems to be coming from
logrotatepackage: https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1915759(TLDR: maintainers seem to come to conclusion to comment out
/var/log/[bw]tmp { ... }blocks in/etc/logrotate.confand rely on their equivalents in/etc/logrotate.d/[bw]tmp)Although I'm not entirely sure if this constitutes for a bug, given that package-supplied
logrotate.confis being overwritten by the file from this repo, perhaps it's worth considering fixing it here now, while anticipating upcoming fix inlogrotatepackage.To Reproduce
Run
/usr/sbin/logrotate /etc/logrotate.confas called fromsystemdandcron.Expected behavior
No errors and exit code
0.System (lsb_release -a):
Additional context
Same problem reported in
logrotatepackage issue tracker: https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1915759@konstruktoid commented on GitHub (Sep 16, 2022):
Thanks again @bob-rove, will have a look at it as soon as possible.
@konstruktoid commented on GitHub (Sep 19, 2022):
Updated the config file for logrotate @bob-rove to make it match upstream.
I believe https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1915759 can be closed since an up-to-date Focal and Jammy don't include the duplicate code.
@bob-rove commented on GitHub (Sep 21, 2022):
Cool stuff, thanks @konstruktoid ! 🙌