Bug 700536 - /var/log/btmp not rotated
Summary: /var/log/btmp not rotated
Keywords:
Status: CLOSED DUPLICATE of bug 485553
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: logrotate
Version: 5.6
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Kaluža
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-28 15:49 UTC by Christopher Hirschmann
Modified: 2020-12-11 14:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-15 08:25:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Christopher Hirschmann 2011-04-28 15:49:47 UTC
Description of problem:

The file /var/log/btmp is not rotated and can grow to enormous sizes. The closely related file /var/log/wtmp is mentioned in /etc/logrotate.conf and will be rotated, /var/log/btmp should be treated the same way.


Version-Release number of selected component (if applicable): 3.7.4-9


How reproducible: always


Steps to Reproduce:
1. setup system with packages initscripts and logrotate installed 
2. let /var/log/btmp grow (you can generate failed logins that will be logged in this file with a script for fast reproduction)
  

Actual results: /var/log/btmp will not get rotated and can grow to enormous size


Expected results: /var/log/btmp should be rotated with logrotate after it grows to a certain size, just like /var/log/wtmp


Additional info:

This is a possible regression on bug #117844.

The Specfile mentions /var/log/btmp only once on line 188:

"- Add section to logrotate.conf for "/var/log/btmp" (#117844)"

However, no such section is added to logrotate.conf. According to the specfile logrotate.conf is copied from the source tarball and installed into the system without further changes:

line 52: install -m 644 examples/logrotate-default $RPM_BUILD_ROOT/etc/logrotate.conf
line 65: %attr(0644, root, root) %config(noreplace) /etc/logrotate.conf

This bug might also affect RHEL 4 and 6, I haven't checked.

Also, I'm wondering about the comment "no packages own wtmp -- we'll rotate them here" in logrotate.conf. According to RPM, /var/log/wtmp and /var/log/btmp are owned by the initscripts package, so maybe it would be a good idea to move rotation of /var/log/wtmp from logrotate.conf into an extra file in /etc/logrotate.d/initscripts and put that file into the initscripts package or something like that.

Comment 5 Jan Kaluža 2012-05-15 08:25:44 UTC
I've just found out this bug has been fixed in logrotate-3.7.4-12 as part of Bug 485553 fix. I will close this one as duplicate of Bug 485553.

*** This bug has been marked as a duplicate of bug 485553 ***


Note You need to log in before you can comment on or make changes to this bug.