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
Showing the changes to kernel (1 of 1 file). Show all
Unified · Split
| @@ -1083,6 +1083,7 @@ static inline int audit_add_rule(struct audit_entry *entry, · 1082 unmodified lines | |||
| 1083 | 1083 | ||
| 1084 | if (entry->rule.flags & AUDIT_FILTER_PREPEND) { | 1084 | if (entry->rule.flags & AUDIT_FILTER_PREPEND) { |
| 1085 | list_add_rcu(&entry->list, list); | 1085 | list_add_rcu(&entry->list, list); |
| 1086 | entry->rule.flags &= ~AUDIT_FILTER_PREPEND; | ||
| 1086 | } else { | 1087 | } else { |
| 1087 | list_add_tail_rcu(&entry->list, list); | 1088 | list_add_tail_rcu(&entry->list, list); |
| 1088 | } | 1089 | } |