summaryrefslogtreecommitdiffstats
path: root/include/linux/audit.h
diff options
context:
space:
mode:
authorJeff Layton2012-10-10 22:43:13 +0200
committerAl Viro2012-10-13 02:15:09 +0200
commitadb5c2473d3f91526c79db972aafb20a56d3fbb3 (patch)
treef0427a11a91af2f5a5d0037ce52c32633019120b /include/linux/audit.h
parentvfs: make path_openat take a struct filename pointer (diff)
downloadkernel-qcow2-linux-adb5c2473d3f91526c79db972aafb20a56d3fbb3.tar.gz
kernel-qcow2-linux-adb5c2473d3f91526c79db972aafb20a56d3fbb3.tar.xz
kernel-qcow2-linux-adb5c2473d3f91526c79db972aafb20a56d3fbb3.zip
audit: make audit_inode take struct filename
Keep a pointer to the audit_names "slot" in struct filename. Have all of the audit_inode callers pass a struct filename ponter to audit_inode instead of a string pointer. If the aname field is already populated, then we can skip walking the list altogether and just use it directly. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/audit.h')
-rw-r--r--include/linux/audit.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index d5d7952ab7d8..e5884f950b4b 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -474,7 +474,7 @@ extern void __audit_syscall_exit(int ret_success, long ret_value);
extern struct filename *__audit_reusename(const __user char *uptr);
extern void __audit_getname(struct filename *name);
extern void audit_putname(struct filename *name);
-extern void __audit_inode(const char *name, const struct dentry *dentry,
+extern void __audit_inode(struct filename *name, const struct dentry *dentry,
unsigned int parent);
extern void __audit_inode_child(const struct inode *parent,
const struct dentry *dentry,
@@ -519,7 +519,7 @@ static inline void audit_getname(struct filename *name)
if (unlikely(!audit_dummy_context()))
__audit_getname(name);
}
-static inline void audit_inode(const char *name, const struct dentry *dentry,
+static inline void audit_inode(struct filename *name, const struct dentry *dentry,
unsigned int parent) {
if (unlikely(!audit_dummy_context()))
__audit_inode(name, dentry, parent);
@@ -680,14 +680,16 @@ static inline void audit_getname(struct filename *name)
{ }
static inline void audit_putname(struct filename *name)
{ }
-static inline void __audit_inode(const char *name, const struct dentry *dentry,
+static inline void __audit_inode(struct filename *name,
+ const struct dentry *dentry,
unsigned int parent)
{ }
static inline void __audit_inode_child(const struct inode *parent,
const struct dentry *dentry,
const unsigned char type)
{ }
-static inline void audit_inode(const char *name, const struct dentry *dentry,
+static inline void audit_inode(struct filename *name,
+ const struct dentry *dentry,
unsigned int parent)
{ }
static inline void audit_inode_child(const struct inode *parent,