mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
audit: pass in dentry to audit_copy_inode wherever possible
In some cases, we were passing in NULL even when we have a dentry. Reported-by: Eric Paris <eparis@redhat.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
f78570dd6a
commit
1c2e51e8c1
@ -2212,7 +2212,7 @@ void __audit_inode_child(const struct dentry *dentry,
|
||||
if (!strcmp(dname, n->name) ||
|
||||
!audit_compare_dname_path(dname, n->name, &dirlen)) {
|
||||
if (inode)
|
||||
audit_copy_inode(n, NULL, inode);
|
||||
audit_copy_inode(n, dentry, inode);
|
||||
else
|
||||
n->ino = (unsigned long)-1;
|
||||
found_child = n->name;
|
||||
@ -2244,7 +2244,7 @@ add_names:
|
||||
}
|
||||
|
||||
if (inode)
|
||||
audit_copy_inode(n, NULL, inode);
|
||||
audit_copy_inode(n, dentry, inode);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__audit_inode_child);
|
||||
|
Loading…
Reference in New Issue
Block a user