mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-09 10:51:03 +01:00
30 lines
799 B
Diff
30 lines
799 B
Diff
From: Steve Beattie <sbeattie@suse.de>
|
|
Subject: Remove redundant check from proc_sys_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>
|
|
|
|
---
|
|
fs/proc/proc_sysctl.c | 7 ++-----
|
|
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
|
--- 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;
|
|
}
|