提交 6a2bceec 编写于 作者: A Amy Griffis 提交者: Al Viro

[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: NAmy Griffis <amy.griffis@hp.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 0a73dccc
...@@ -1083,6 +1083,7 @@ static inline int audit_add_rule(struct audit_entry *entry, ...@@ -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);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册