From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Grubb Subject: Re: Error deleting rule during shutdown with -e 2 Date: Wed, 12 Oct 2011 11:27:26 -0400 Message-ID: <201110121127.26467.sgrubb@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com List-Id: linux-audit@redhat.com On Wednesday, October 12, 2011 11:12:55 AM Daniel Neuberger wrote: > When stopping auditd during a system shutdown, I see the following error: > > Error deleting rule (Operation not permitted) > > My audit.rules file looks like: > ------------------------ > -D > [trimmed] > -a always,exit -F arch=b32 -S open -S openat -F exit=-EPERM -k access4 > -w /etc/sudoers -p wa -k actions -p wax > [trimmed] > -e 2 > ------------------------ > > The only ways I've found to fix this is to remove the -e 2 option, but > we need our rules to be immutable? Right. If its immutable, you cannot delete the rule. I suppose I could add some code here so that it succeed but outputs the reason why it cannot honor the request. > Also based on looking at the auditd init script, setting > AUDITD_CLEAN_STOP=no during shutdown would work, but I don't want to > modify the script. You would normally modify /etc/sysconfig/auditd to adjust this setting. This is considered a config file that rpm will not overwrite. -Steve