~ubuntu-branches/ubuntu/raring/apparmor/raring

« back to all changes in this revision

Viewing changes to kernel-patches/for-mainline/proc_sys_setattr.diff

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-03-23 16:42:01 UTC
  • Revision ID: james.westby@ubuntu.com-20070323164201-jkax6f0oku087b7l
Tags: upstream-2.0.1+510.dfsg
ImportĀ upstreamĀ versionĀ 2.0.1+510.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Remove redundant check from proc_sys_setattr(), similar to recent fixup
 
2
in proc_setattr().
 
3
 
 
4
notify_change() already calls security_inode_setattr() before
 
5
calling iop->setattr.
 
6
 
 
7
Signed-off-by: Steve Beattie <sbeattie@suse.de>
 
8
---
 
9
 fs/proc/proc_sysctl.c |    7 ++-----
 
10
 1 file changed, 2 insertions(+), 5 deletions(-)
 
11
 
 
12
Index: b/fs/proc/proc_sysctl.c
 
13
===================================================================
 
14
--- a/fs/proc/proc_sysctl.c
 
15
+++ b/fs/proc/proc_sysctl.c
 
16
@@ -429,11 +429,8 @@ static int proc_sys_setattr(struct dentr
 
17
                return -EPERM;
 
18
 
 
19
        error = inode_change_ok(inode, attr);
 
20
-       if (!error) {
 
21
-               error = security_inode_setattr(dentry, attr);
 
22
-               if (!error)
 
23
-                       error = inode_setattr(inode, attr);
 
24
-       }
 
25
+       if (!error)
 
26
+               error = inode_setattr(inode, attr);
 
27
 
 
28
        return error;
 
29
 }