summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAmy Griffis <amy.griffis@hp.com>2006-06-02 13:16:01 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2006-06-20 05:25:28 -0400
commit6a2bceec0ea7fdc47aef9a3f2f771c201eaabe5d (patch)
tree9496dcc64e7cf94f4e87f01957ef41ed18b13e40 /kernel
parent0a73dccc4fd472e65887eae6fbf4afc030541709 (diff)
downloadlinux-6a2bceec0ea7fdc47aef9a3f2f771c201eaabe5d.tar.bz2
[PATCH] fix AUDIT_FILTER_PREPEND handling
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 <amy.griffis@hp.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditfilter.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 9f985dd5e937..a536f7148bcd 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -1083,6 +1083,7 @@ static inline int audit_add_rule(struct audit_entry *entry,
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);
}