diff options
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 3828ad5fb8f1..b87a63beb66c 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -65,7 +65,6 @@ | |||
65 | #include <linux/binfmts.h> | 65 | #include <linux/binfmts.h> |
66 | #include <linux/highmem.h> | 66 | #include <linux/highmem.h> |
67 | #include <linux/syscalls.h> | 67 | #include <linux/syscalls.h> |
68 | #include <linux/inotify.h> | ||
69 | #include <linux/capability.h> | 68 | #include <linux/capability.h> |
70 | #include <linux/fs_struct.h> | 69 | #include <linux/fs_struct.h> |
71 | 70 | ||
@@ -549,9 +548,8 @@ static int audit_filter_rules(struct task_struct *tsk, | |||
549 | } | 548 | } |
550 | break; | 549 | break; |
551 | case AUDIT_WATCH: | 550 | case AUDIT_WATCH: |
552 | if (name && audit_watch_inode(rule->watch) != (unsigned long)-1) | 551 | if (name) |
553 | result = (name->dev == audit_watch_dev(rule->watch) && | 552 | result = audit_watch_compare(rule->watch, name->ino, name->dev); |
554 | name->ino == audit_watch_inode(rule->watch)); | ||
555 | break; | 553 | break; |
556 | case AUDIT_DIR: | 554 | case AUDIT_DIR: |
557 | if (ctx) | 555 | if (ctx) |
@@ -1726,7 +1724,7 @@ static inline void handle_one(const struct inode *inode) | |||
1726 | struct audit_tree_refs *p; | 1724 | struct audit_tree_refs *p; |
1727 | struct audit_chunk *chunk; | 1725 | struct audit_chunk *chunk; |
1728 | int count; | 1726 | int count; |
1729 | if (likely(list_empty(&inode->inotify_watches))) | 1727 | if (likely(hlist_empty(&inode->i_fsnotify_marks))) |
1730 | return; | 1728 | return; |
1731 | context = current->audit_context; | 1729 | context = current->audit_context; |
1732 | p = context->trees; | 1730 | p = context->trees; |
@@ -1769,7 +1767,7 @@ retry: | |||
1769 | seq = read_seqbegin(&rename_lock); | 1767 | seq = read_seqbegin(&rename_lock); |
1770 | for(;;) { | 1768 | for(;;) { |
1771 | struct inode *inode = d->d_inode; | 1769 | struct inode *inode = d->d_inode; |
1772 | if (inode && unlikely(!list_empty(&inode->inotify_watches))) { | 1770 | if (inode && unlikely(!hlist_empty(&inode->i_fsnotify_marks))) { |
1773 | struct audit_chunk *chunk; | 1771 | struct audit_chunk *chunk; |
1774 | chunk = audit_tree_lookup(inode); | 1772 | chunk = audit_tree_lookup(inode); |
1775 | if (chunk) { | 1773 | if (chunk) { |