Merge tag 'pwm/for-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry...
[firefly-linux-kernel-4.4.55.git] / kernel / auditsc.c
index e420a0c41b5f605b0f4ead982eac279e066ffee2..c75522a83678d14d542f0e1b25a13180762803ca 100644 (file)
@@ -1897,6 +1897,11 @@ out:
        audit_copy_inode(n, dentry, inode);
 }
 
+void __audit_file(const struct file *file)
+{
+       __audit_inode(NULL, file->f_path.dentry, 0);
+}
+
 /**
  * __audit_inode_child - collect inode info for created/removed objects
  * @parent: inode of dentry parent
@@ -2373,7 +2378,7 @@ int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
        ax->d.next = context->aux;
        context->aux = (void *)ax;
 
-       dentry = dget(bprm->file->f_dentry);
+       dentry = dget(bprm->file->f_path.dentry);
        get_vfs_caps_from_disk(dentry, &vcaps);
        dput(dentry);