mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-05 08:45:22 +00:00
28 lines
811 B
Diff
28 lines
811 B
Diff
Remove redundant check from proc_sys_setattr()
|
|
|
|
This is similar to a recent fixup in proc_setattr(): notify_change()
|
|
already calls security_inode_setattr() before calling iop->setattr.
|
|
|
|
Signed-off-by: Steve Beattie <sbeattie@suse.de>
|
|
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
|
Signed-off-by: John Johansen <jjohansen@suse.de>
|
|
|
|
Index: b/fs/proc/proc_sysctl.c
|
|
===================================================================
|
|
--- a/fs/proc/proc_sysctl.c
|
|
+++ b/fs/proc/proc_sysctl.c
|
|
@@ -429,11 +429,8 @@ static int proc_sys_setattr(struct dentr
|
|
return -EPERM;
|
|
|
|
error = inode_change_ok(inode, attr);
|
|
- if (!error) {
|
|
- error = security_inode_setattr(dentry, attr);
|
|
- if (!error)
|
|
- error = inode_setattr(inode, attr);
|
|
- }
|
|
+ if (!error)
|
|
+ error = inode_setattr(inode, attr);
|
|
|
|
return error;
|
|
}
|