mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[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>
This commit is contained in:
parent
0a73dccc4f
commit
6a2bceec0e
1 changed files with 1 additions and 0 deletions
|
@ -1083,6 +1083,7 @@ static inline int audit_add_rule(struct audit_entry *entry,
|
||||||
|
|
||||||
if (entry->rule.flags & AUDIT_FILTER_PREPEND) {
|
if (entry->rule.flags & AUDIT_FILTER_PREPEND) {
|
||||||
list_add_rcu(&entry->list, list);
|
list_add_rcu(&entry->list, list);
|
||||||
|
entry->rule.flags &= ~AUDIT_FILTER_PREPEND;
|
||||||
} else {
|
} else {
|
||||||
list_add_tail_rcu(&entry->list, list);
|
list_add_tail_rcu(&entry->list, list);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue