mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-05 16:55:32 +00:00
27 lines
716 B
Diff
27 lines
716 B
Diff
![]() |
Remove redundant check from proc_setattr()
|
||
|
|
||
|
notify_change() already calls security_inode_setattr() before
|
||
|
calling iop->setattr.
|
||
|
|
||
|
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||
|
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||
|
|
||
|
Index: linux-2.6.19/fs/proc/base.c
|
||
|
===================================================================
|
||
|
--- linux-2.6.19.orig/fs/proc/base.c
|
||
|
+++ linux-2.6.19/fs/proc/base.c
|
||
|
@@ -344,11 +344,8 @@ static int proc_setattr(struct dentry *d
|
||
|
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;
|
||
|
}
|
||
|
|