diff options
author | Eric Paris <eparis@redhat.com> | 2009-06-11 14:31:36 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-23 23:50:59 -0400 |
commit | cfcad62c74abfef83762dc05a556d21bdf3980a2 (patch) | |
tree | d253dbf8dfa4d31379dcd886cc1b41c69921acdd /kernel/audit.c | |
parent | ea7ae60bfe39aeedfb29571c47280bf0067ee5f3 (diff) |
audit: seperate audit inode watches into a subfile
In preparation for converting audit to use fsnotify instead of inotify we
seperate the inode watching code into it's own file. This is similar to
how the audit tree watching code is already seperated into audit_tree.c
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'kernel/audit.c')
-rw-r--r-- | kernel/audit.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index ce77e81a0e71..e07ad2340dbe 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -115,9 +115,6 @@ static atomic_t audit_lost = ATOMIC_INIT(0); | |||
115 | /* The netlink socket. */ | 115 | /* The netlink socket. */ |
116 | static struct sock *audit_sock; | 116 | static struct sock *audit_sock; |
117 | 117 | ||
118 | /* Inotify handle. */ | ||
119 | struct inotify_handle *audit_ih; | ||
120 | |||
121 | /* Hash for inode-based rules */ | 118 | /* Hash for inode-based rules */ |
122 | struct list_head audit_inode_hash[AUDIT_INODE_BUCKETS]; | 119 | struct list_head audit_inode_hash[AUDIT_INODE_BUCKETS]; |
123 | 120 | ||
@@ -971,13 +968,6 @@ static void audit_receive(struct sk_buff *skb) | |||
971 | mutex_unlock(&audit_cmd_mutex); | 968 | mutex_unlock(&audit_cmd_mutex); |
972 | } | 969 | } |
973 | 970 | ||
974 | #ifdef CONFIG_AUDITSYSCALL | ||
975 | static const struct inotify_operations audit_inotify_ops = { | ||
976 | .handle_event = audit_handle_ievent, | ||
977 | .destroy_watch = audit_free_parent, | ||
978 | }; | ||
979 | #endif | ||
980 | |||
981 | /* Initialize audit support at boot time. */ | 971 | /* Initialize audit support at boot time. */ |
982 | static int __init audit_init(void) | 972 | static int __init audit_init(void) |
983 | { | 973 | { |
@@ -1003,12 +993,6 @@ static int __init audit_init(void) | |||
1003 | 993 | ||
1004 | audit_log(NULL, GFP_KERNEL, AUDIT_KERNEL, "initialized"); | 994 | audit_log(NULL, GFP_KERNEL, AUDIT_KERNEL, "initialized"); |
1005 | 995 | ||
1006 | #ifdef CONFIG_AUDITSYSCALL | ||
1007 | audit_ih = inotify_init(&audit_inotify_ops); | ||
1008 | if (IS_ERR(audit_ih)) | ||
1009 | audit_panic("cannot initialize inotify handle"); | ||
1010 | #endif | ||
1011 | |||
1012 | for (i = 0; i < AUDIT_INODE_BUCKETS; i++) | 996 | for (i = 0; i < AUDIT_INODE_BUCKETS; i++) |
1013 | INIT_LIST_HEAD(&audit_inode_hash[i]); | 997 | INIT_LIST_HEAD(&audit_inode_hash[i]); |
1014 | 998 | ||