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>
This commit is contained in:
@@ -804,7 +804,7 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, umode_t, mode,
|
||||
|
||||
if (oflag & O_CREAT) {
|
||||
if (path.dentry->d_inode) { /* entry already exists */
|
||||
audit_inode(name->name, path.dentry, 0);
|
||||
audit_inode(name, path.dentry, 0);
|
||||
if (oflag & O_EXCL) {
|
||||
error = -EEXIST;
|
||||
goto out;
|
||||
@@ -824,7 +824,7 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, umode_t, mode,
|
||||
error = -ENOENT;
|
||||
goto out;
|
||||
}
|
||||
audit_inode(name->name, path.dentry, 0);
|
||||
audit_inode(name, path.dentry, 0);
|
||||
filp = do_open(&path, oflag);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user