Skip to content

Commit

Permalink
vfs: do_last(): add audit_inode before open
Browse files Browse the repository at this point in the history
This allows this code to be shared between O_CREAT and plain opens.

Signed-off-by: Miklos Szeredi <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Miklos Szeredi authored and Al Viro committed Jun 1, 2012
1 parent 050ac84 commit d7fdd7f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2389,6 +2389,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
error = -ENOTDIR;
if ((nd->flags & LOOKUP_DIRECTORY) && !nd->inode->i_op->lookup)
goto exit;
audit_inode(pathname, nd->path.dentry);
ok:
if (!S_ISREG(nd->inode->i_mode))
will_truncate = 0;
Expand Down

0 comments on commit d7fdd7f

Please sign in to comment.