mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
669abf4e55
commit
adb5c2473d
5 changed files with 42 additions and 19 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue