diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-10-31 22:44:57 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-19 19:01:26 +0100 |
commit | 9f45f5bf302daad6835ce64701fb3c286a2cc6af (patch) | |
tree | f267e8363c8c9db15195f1698997179a1370687c /kernel/auditsc.c | |
parent | nfsd_vfs_write(): use file_inode() (diff) | |
download | linux-9f45f5bf302daad6835ce64701fb3c286a2cc6af.tar.xz 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.c | 5 |
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 |