RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1672287 - auditd: max_log_file_action "keep_logs" doesn't behave as it is described in manual
Summary: auditd: max_log_file_action "keep_logs" doesn't behave as it is described i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: audit
Version: 7.6
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Steve Grubb
QA Contact: Ondrej Moriš
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-04 13:25 UTC by Sham Antony
Modified: 2019-08-06 13:03 UTC (History)
2 users (show)

Fixed In Version: audit-2.8.5-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 13:03:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2191 0 None None None 2019-08-06 13:03:53 UTC

Description Sham Antony 2019-02-04 13:25:50 UTC
Description of problem:

auditd: max_log_file_action "keep_logs" doesn't behave as it is described in manual. audit don't rotate logs when num_logs is < 2.

As man page described, the keep_logs option is similar to rotate except it does not use the num_logs setting. So it should work even when num_logs is < 2.

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

RHEL 7.6
audit-2.8.4-4.el7.x86_64

How reproducible:

# rpm -qa audit

audit-2.8.4-4.el7.x86_64

--------
num_logs = 0
max_log_file = X <---- Any size
max_log_file_action = keep_logs
---------

Let audit generate events and hit the specified (max_log_file) size limit 

Actual results:

Audit don't rotate the logs, /var/log/audit/audit.log size getting increased.

Expected results:

Audit should rotate logs,

/var/log/audit/audit.log.1
/var/log/audit/audit.log.2

Additional info:

Working as expected with version audit-2.7.6-3.el7.x86_64

Comment 2 Steve Grubb 2019-02-04 14:02:04 UTC
Fixed in upstream commit a7f9f8b.

Comment 4 Steve Grubb 2019-03-05 18:06:54 UTC
audit-2.8.5-1.el7 was built to address this issue.

Comment 10 errata-xmlrpc 2019-08-06 13:03:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2191


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