summaryrefslogtreecommitdiffstats
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
authorAl Viro2014-10-31 22:44:57 +0100
committerAl Viro2014-11-19 19:01:26 +0100
commit9f45f5bf302daad6835ce64701fb3c286a2cc6af (patch)
treef267e8363c8c9db15195f1698997179a1370687c /kernel/auditsc.c
parentnfsd_vfs_write(): use file_inode() (diff)
downloadkernel-qcow2-linux-9f45f5bf302daad6835ce64701fb3c286a2cc6af.tar.gz
kernel-qcow2-linux-9f45f5bf302daad6835ce64701fb3c286a2cc6af.tar.xz
kernel-qcow2-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