mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[PATCH] pass dentry to audit_inode()/audit_inode_child()
makes caller simpler *and* allows to scan ancestors Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
cfa76f024f
commit
5a190ae697
8 changed files with 33 additions and 30 deletions
|
|
@ -267,7 +267,7 @@ sys_fsetxattr(int fd, char __user *name, void __user *value,
|
|||
if (!f)
|
||||
return error;
|
||||
dentry = f->f_path.dentry;
|
||||
audit_inode(NULL, dentry->d_inode);
|
||||
audit_inode(NULL, dentry);
|
||||
error = setxattr(dentry, name, value, size, flags);
|
||||
fput(f);
|
||||
return error;
|
||||
|
|
@ -349,7 +349,7 @@ sys_fgetxattr(int fd, char __user *name, void __user *value, size_t size)
|
|||
f = fget(fd);
|
||||
if (!f)
|
||||
return error;
|
||||
audit_inode(NULL, f->f_path.dentry->d_inode);
|
||||
audit_inode(NULL, f->f_path.dentry);
|
||||
error = getxattr(f->f_path.dentry, name, value, size);
|
||||
fput(f);
|
||||
return error;
|
||||
|
|
@ -422,7 +422,7 @@ sys_flistxattr(int fd, char __user *list, size_t size)
|
|||
f = fget(fd);
|
||||
if (!f)
|
||||
return error;
|
||||
audit_inode(NULL, f->f_path.dentry->d_inode);
|
||||
audit_inode(NULL, f->f_path.dentry);
|
||||
error = listxattr(f->f_path.dentry, list, size);
|
||||
fput(f);
|
||||
return error;
|
||||
|
|
@ -485,7 +485,7 @@ sys_fremovexattr(int fd, char __user *name)
|
|||
if (!f)
|
||||
return error;
|
||||
dentry = f->f_path.dentry;
|
||||
audit_inode(NULL, dentry->d_inode);
|
||||
audit_inode(NULL, dentry);
|
||||
error = removexattr(dentry, name);
|
||||
fput(f);
|
||||
return error;
|
||||
|
|
|
|||
Loading…
Reference in a new issue