Skip to content

Commit 6a2bcee

Browse files
Amy GriffisAl Viro
authored andcommitted
[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>
1 parent 0a73dcc commit 6a2bcee

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎kernel/auditfilter.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,7 @@ static inline int audit_add_rule(struct audit_entry *entry,
10831083

10841084
if (entry->rule.flags & AUDIT_FILTER_PREPEND) {
10851085
list_add_rcu(&entry->list, list);
1086+
entry->rule.flags &= ~AUDIT_FILTER_PREPEND;
10861087
} else {
10871088
list_add_tail_rcu(&entry->list, list);
10881089
}

0 commit comments

Comments
 (0)