Bug 176356 - audit.log not rotated
audit.log not rotated
Product: Fedora
Classification: Fedora
Component: audit (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Steve Grubb
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2005-12-21 13:10 EST by Allen Kistler
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-12-21 14:32:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Allen Kistler 2005-12-21 13:10:00 EST
Description of problem:

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

How reproducible:

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 13:10:00 EST
Created attachment 122500 [details]
cron.weekly script
Comment 2 Steve Grubb 2005-12-21 13:47:11 EST
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 14:32:33 EST
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.