Bug 176356 - audit.log not rotated
Summary: audit.log not rotated
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: audit
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Steve Grubb
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-12-21 18:10 UTC by Allen Kistler
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-12-21 19:32:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
cron.weekly script (106 bytes, text/plain)
2005-12-21 18:10 UTC, Allen Kistler
no flags Details

Description Allen Kistler 2005-12-21 18:10:00 UTC
Description of problem:
/var/log/audit.log

Version-Release number of selected component (if applicable):
audit-1.1.2-1.1

How reproducible:
Always

Steps to Reproduce:
1. Enable auditd to run on boot (default)
2. Wait a week
3. Notice audit.log never rotates
  
Actual results:
/var/log/audit/audit.log just grows and grows

Expected results:
/var/log/audit/audit.log should rotate

Additional info:
Signal "USR1 causes auditd to immediately rotate the logs" (from the man page),
so logrotate probably shouldn't be involved.  I added a small script to
/etc/cron.weekly that does the trick (attached), though it may not be the most
elegant solution.

Comment 1 Allen Kistler 2005-12-21 18:10:00 UTC
Created attachment 122500 [details]
cron.weekly script

Comment 2 Steve Grubb 2005-12-21 18:47:11 UTC
The audit logs are rotated based on size rather than day of the week. The
SIGUSR1 handler was added so that people could use the cron script that is
shipped with the audit package: /usr/share/doc/audit-1.0.12/auditd.cron. You can
install it if you want daily or weekly rotating.

You would also want to set the max_log_file_action item to ignore so that the
audit system doesn't rotate the files too early.

Does this help?

Comment 3 Allen Kistler 2005-12-21 19:32:33 UTC
OK.  Reading the docs and config more closely, I was about 100K away from the
threshold.  More patience and RTFMing needed from me.


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