mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
vfs: do_last(): add audit_inode before open
This allows this code to be shared between O_CREAT and plain opens. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
050ac841ea
commit
d7fdd7f6e1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user