aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/audit.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-06-24 00:02:38 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-24 00:02:38 -0400
commit916d75761c971b6e630a26bd4ba472e90ac9a4b9 (patch)
tree3a4b18d0d29c1d12f64fefbb2bc5559813a686f7 /kernel/audit.c
parent9d9609851003ebed15957f0f2ce18492739ee124 (diff)
Fix rule eviction order for AUDIT_DIR
If syscall removes the root of subtree being watched, we definitely do not want the rules refering that subtree to be destroyed without the syscall in question having a chance to match them. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/audit.c')
-rw-r--r--kernel/audit.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index 6194c50e2039..defc2e6f1e3b 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -133,7 +133,7 @@ static DECLARE_WAIT_QUEUE_HEAD(kauditd_wait);
133static DECLARE_WAIT_QUEUE_HEAD(audit_backlog_wait); 133static DECLARE_WAIT_QUEUE_HEAD(audit_backlog_wait);
134 134
135/* Serialize requests from userspace. */ 135/* Serialize requests from userspace. */
136static DEFINE_MUTEX(audit_cmd_mutex); 136DEFINE_MUTEX(audit_cmd_mutex);
137 137
138/* AUDIT_BUFSIZ is the size of the temporary buffer used for formatting 138/* AUDIT_BUFSIZ is the size of the temporary buffer used for formatting
139 * audit records. Since printk uses a 1024 byte buffer, this buffer 139 * audit records. Since printk uses a 1024 byte buffer, this buffer
@@ -505,21 +505,6 @@ int audit_send_list(void *_dest)
505 return 0; 505 return 0;
506} 506}
507 507
508#ifdef CONFIG_AUDIT_TREE
509static int prune_tree_thread(void *unused)
510{
511 mutex_lock(&audit_cmd_mutex);
512 audit_prune_trees();
513 mutex_unlock(&audit_cmd_mutex);
514 return 0;
515}
516
517void audit_schedule_prune(void)
518{
519 kthread_run(prune_tree_thread, NULL, "audit_prune_tree");
520}
521#endif
522
523struct sk_buff *audit_make_reply(int pid, int seq, int type, int done, 508struct sk_buff *audit_make_reply(int pid, int seq, int type, int done,
524 int multi, void *payload, int size) 509 int multi, void *payload, int size)
525{ 510{