Skip to contentSkip to conversation

audit rules ordering, part 2

PATCH In review Al Viro 2 participants 2 messages Dec 17, 2008 Audit

lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 12/15 audit rules ordering, part 2

Fix the actual rule listing; add per-type lists _not_ used for matching, with all exit,... sitting on one such list. Simplifies "do something for all rules" logics, while we are at it...

---
 include/linux/audit.h |    1 +
 kernel/audit_tree.c   |    1 +
 kernel/auditfilter.c  |   95 ++++++++++++++++++++-----------------------------
 3 files changed, 41 insertions(+), 56 deletions(-)
include/linux/audit.h +1 -0
index d28682c..4e37f06 100644
@@ -371,6 +371,7 @@ struct audit_krule {
 	struct audit_watch	*watch;	/* associated watch */
 	struct audit_tree	*tree;	/* associated watched tree */
 	struct list_head	rlist;	/* entry in audit_{watch,tree}.rules list */
+	struct list_head	list;	/* for AUDIT_LIST* purposes only */
 	u64			prio;
 };
 
kernel/audit_tree.c +1 -0
index 8b50944..48bddad 100644
@@ -450,6 +450,7 @@ static void kill_rules(struct audit_tree *tree)
 			audit_log_end(ab);
 			rule->tree = NULL;
 			list_del_rcu(&entry->list);
+			list_del(&entry->rule.list);
 			call_rcu(&entry->rcu, audit_free_rule_rcu);
 		}
 	}
kernel/auditfilter.c +39 -56

200 lines not on this page · raw message

Signature · 1 line
1.5.6.5