diff options
Diffstat (limited to 'include/linux/fsnotify.h')
-rw-r--r-- | include/linux/fsnotify.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index f7e517c1f1bd..11438eff4d44 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/dnotify.h> | 16 | #include <linux/dnotify.h> |
17 | #include <linux/inotify.h> | 17 | #include <linux/inotify.h> |
18 | #include <linux/audit.h> | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * fsnotify_d_instantiate - instantiate a dentry for inode | 21 | * fsnotify_d_instantiate - instantiate a dentry for inode |
@@ -64,6 +65,8 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
64 | if (source) { | 65 | if (source) { |
65 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL); | 66 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL); |
66 | } | 67 | } |
68 | audit_inode_child(old_name, source, old_dir->i_ino); | ||
69 | audit_inode_child(new_name, target, new_dir->i_ino); | ||
67 | } | 70 | } |
68 | 71 | ||
69 | /* | 72 | /* |
@@ -89,19 +92,22 @@ static inline void fsnotify_inoderemove(struct inode *inode) | |||
89 | /* | 92 | /* |
90 | * fsnotify_create - 'name' was linked in | 93 | * fsnotify_create - 'name' was linked in |
91 | */ | 94 | */ |
92 | static inline void fsnotify_create(struct inode *inode, const char *name) | 95 | static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) |
93 | { | 96 | { |
94 | inode_dir_notify(inode, DN_CREATE); | 97 | inode_dir_notify(inode, DN_CREATE); |
95 | inotify_inode_queue_event(inode, IN_CREATE, 0, name); | 98 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name); |
99 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); | ||
96 | } | 100 | } |
97 | 101 | ||
98 | /* | 102 | /* |
99 | * fsnotify_mkdir - directory 'name' was created | 103 | * fsnotify_mkdir - directory 'name' was created |
100 | */ | 104 | */ |
101 | static inline void fsnotify_mkdir(struct inode *inode, const char *name) | 105 | static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) |
102 | { | 106 | { |
103 | inode_dir_notify(inode, DN_CREATE); | 107 | inode_dir_notify(inode, DN_CREATE); |
104 | inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, name); | 108 | inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, |
109 | dentry->d_name.name); | ||
110 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); | ||
105 | } | 111 | } |
106 | 112 | ||
107 | /* | 113 | /* |