Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7fdd7f6 authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Al Viro
Browse files

vfs: do_last(): add audit_inode before open



This allows this code to be shared between O_CREAT and plain opens.

Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 050ac841
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;