From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amy Griffis Subject: [PATCH] fix AUDIT_FILTER_PREPEND handling Date: Fri, 2 Jun 2006 13:16:01 -0400 Message-ID: <20060602171601.GA7717@zk3.dec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mx3.redhat.com (mx3.redhat.com [172.16.48.32]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k52HGL7S006532 for ; Fri, 2 Jun 2006 13:16:21 -0400 Received: from ccerelbas02.cce.hp.com (ccerelbas02.cce.hp.com [161.114.21.105]) by mx3.redhat.com (8.13.1/8.13.1) with ESMTP id k52HGEtc016664 for ; Fri, 2 Jun 2006 13:16:15 -0400 Content-Disposition: inline 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 Clear AUDIT_FILTER_PREPEND flag after adding rule to list. This fixes three problems when a rule is added with the -A syntax: - auditctl displays filter list as "(null)" - the rule cannot be removed using -d - a duplicate rule can be added with -a Signed-off-by: Amy Griffis --- kernel/auditfilter.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 6695e89ba4cf4940682769a2f3cc217564754c1f diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index ff85fee..1c47df1 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -1012,6 +1012,7 @@ static inline int audit_add_rule(struct if (entry->rule.flags & AUDIT_FILTER_PREPEND) { list_add_rcu(&entry->list, list); + entry->rule.flags &= ~AUDIT_FILTER_PREPEND; } else { list_add_tail_rcu(&entry->list, list); } -- 1.3.0