apparmor/lkml/patches/proc_setattr.diff
2007-01-10 04:26:40 +00:00

22 lines
623 B
Diff

notify_change() already calls security_inode_setattr() before
calling iop->setattr. Remove the redundant check from
proc_setattr.
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;
}