mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] pass dentry to audit_inode()/audit_inode_child()
makes caller simpler *and* allows to scan ancestors Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
cfa76f024f
commit
5a190ae697
8 changed files with 33 additions and 30 deletions
|
@ -41,8 +41,9 @@ static inline void fsnotify_d_move(struct dentry *entry)
|
|||
*/
|
||||
static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
|
||||
const char *old_name, const char *new_name,
|
||||
int isdir, struct inode *target, struct inode *source)
|
||||
int isdir, struct inode *target, struct dentry *moved)
|
||||
{
|
||||
struct inode *source = moved->d_inode;
|
||||
u32 cookie = inotify_get_cookie();
|
||||
|
||||
if (old_dir == new_dir)
|
||||
|
@ -67,7 +68,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
|
|||
if (source) {
|
||||
inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL);
|
||||
}
|
||||
audit_inode_child(new_name, source, new_dir);
|
||||
audit_inode_child(new_name, moved, new_dir);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -98,7 +99,7 @@ static inline void fsnotify_create(struct inode *inode, struct dentry *dentry)
|
|||
inode_dir_notify(inode, DN_CREATE);
|
||||
inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name,
|
||||
dentry->d_inode);
|
||||
audit_inode_child(dentry->d_name.name, dentry->d_inode, inode);
|
||||
audit_inode_child(dentry->d_name.name, dentry, inode);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -109,7 +110,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry)
|
|||
inode_dir_notify(inode, DN_CREATE);
|
||||
inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0,
|
||||
dentry->d_name.name, dentry->d_inode);
|
||||
audit_inode_child(dentry->d_name.name, dentry->d_inode, inode);
|
||||
audit_inode_child(dentry->d_name.name, dentry, inode);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue