summaryrefslogtreecommitdiffstats
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-10-31 17:44:57 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-11-19 13:01:26 -0500
commit9f45f5bf302daad6835ce64701fb3c286a2cc6af (patch)
treef267e8363c8c9db15195f1698997179a1370687c /kernel/auditsc.c
parent6f4e0d5aaa9efaa701f4c3c0bb9b22d7943157c9 (diff)
downloadlinux-9f45f5bf302daad6835ce64701fb3c286a2cc6af.tar.gz
linux-9f45f5bf302daad6835ce64701fb3c286a2cc6af.tar.bz2
linux-9f45f5bf302daad6835ce64701fb3c286a2cc6af.zip
new helper: audit_file()
... for situations when we don't have any candidate in pathnames - basically, in descriptor-based syscalls. [Folded the build fix for !CONFIG_AUDITSYSCALL configs from Chen Gang] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r--kernel/auditsc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 06820657c8ca..c75522a83678 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -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