提交 d7fdd7f6 编写于 作者: M Miklos Szeredi 提交者: Al Viro

vfs: do_last(): add audit_inode before open

This allows this code to be shared between O_CREAT and plain opens.
Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 050ac841
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册