Skip to content

Commit

Permalink
audit: pass in dentry to audit_copy_inode wherever possible
Browse files Browse the repository at this point in the history
In some cases, we were passing in NULL even when we have a dentry.

Reported-by: Eric Paris <[email protected]>
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
jtlayton authored and Al Viro committed Oct 12, 2012
1 parent f78570d commit 1c2e51e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -2244,7 +2244,7 @@ void __audit_inode_child(const struct dentry *dentry,
}

if (inode)
audit_copy_inode(n, NULL, inode);
audit_copy_inode(n, dentry, inode);
}
}
EXPORT_SYMBOL_GPL(__audit_inode_child);
Expand Down

0 comments on commit 1c2e51e

Please sign in to comment.