Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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

Summary: auditd: max_log_file_action "keep_logs" doesn't behave as it is described in manual
Product: Red Hat Enterprise Linux 7 Reporter: Sham Antony <santony>
Component: auditAssignee: Steve Grubb <sgrubb>
Status: CLOSED ERRATA QA Contact: Ondrej Moriš <omoris>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.6CC: omoris, sgrubb
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: audit-2.8.5-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 13:03:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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