From: Miklos Szeredi Date: Mon, 21 May 2012 15:30:13 +0000 (+0200) Subject: vfs: do_last(): add audit_inode before open X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d7fdd7f6e1afbffda03aeacb90039c092e8cacf8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Al Viro --- diff --git a/fs/namei.c b/fs/namei.c index 90210b46b461..125386c250bb 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -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;