Bug 208834

Summary: auditd fails to restart after log rotation with num_logs=0
Product: Red Hat Enterprise Linux 5 Reporter: Bastien Nocera <bnocera>
Component: auditAssignee: Steve Grubb <sgrubb>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 5.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-19 15:50:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
auditd.fix none

Description Bastien Nocera 2006-10-02 10:15:25 UTC
audit-1.2.5-8

1. Set num_logs=0 in /etc/audit/auditd.conf
2. Restart auditd
3. run "killall -USR1 auditd" to attempt log rotation
4. Try to restart auditd:
Sep 28 11:38:18 test auditd: /var/log/audit/audit.log permissions should be 0640
Sep 28 11:38:18 test auditd: The audit daemon is exiting.

The log rotation code changes the permissions on the log file before trying to
move it. It shouldn't do that as it won't rotate anything with num_logs=0

Comment 1 Bastien Nocera 2006-10-02 10:18:30 UTC
Created attachment 137532 [details]
auditd.fix

Patch from srinivds.com to fix the problem
Will probably need indentation changes

Comment 2 Steve Grubb 2006-10-02 13:01:30 UTC
Will review problem and fix in 1.2.9. There is probably a more general solution
needed since it should never enter the rotate code if num_logs == 0.

Comment 3 Steve Grubb 2006-10-17 14:13:24 UTC
audit-1.2.8-2 was built to solve this problem. Thanks for reporting it.

Comment 4 RHEL Program Management 2006-10-26 19:40:19 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 7 James Laska 2006-12-14 13:09:14 UTC
Thank you for the detailed test case.  Marking as VERIFIED

Comment 8 Jay Turner 2006-12-19 15:50:33 UTC
audit-1.3.1-1.el5 included in 20061218.1 trees.