History

[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

Amy Griffis committed 20 years ago

Commit 6a2bcee1 parent 0a73dcc1 file · +1 −0Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/auditfilter.c+1−0
@@ -1083,6 +1083,7 @@ static inline int audit_add_rule(struct audit_entry *entry, · 1082 unmodified lines
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 }