Commit:     9d0633cfedde484d30eef869f749c04709ab3e42
Parent:     1e8123fdeda6b2b9e96f2ec56e7bed27a303d3eb
Author:     John Johansen <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 00:29:44 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue May 8 11:15:10 2007 -0700

    Remove redundant check from proc_sys_setattr()
    notify_change() already calls security_inode_setattr() before
    calling iop->setattr.
    Alan sayeth
      This is a behaviour change on all of these and limits some behaviour of
      existing established security modules
      When inode_change_ok is called it has side effects.  This includes
      clearing the SGID bit on attribute changes caused by chmod.  If you make
      this change the results of some rulesets may be different before or after
      the change is made.
      I'm not saying the change is wrong but it does change behaviour so that
      needs looking at closely (ditto all other attribute twiddles)
    Signed-off-by: Steve Beattie <[EMAIL PROTECTED]>
    Signed-off-by: Andreas Gruenbacher <[EMAIL PROTECTED]>
    Signed-off-by: John Johansen <[EMAIL PROTECTED]>
    Acked-by: Stephen Smalley <[EMAIL PROTECTED]>
    Cc: James Morris <[EMAIL PROTECTED]>
    Cc: Chris Wright <[EMAIL PROTECTED]>
    Cc: Alan Cox <[EMAIL PROTECTED]>
    Cc: Christoph Hellwig <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/proc/proc_sysctl.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 20e8cbb..680c429 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -429,11 +429,8 @@ static int proc_sys_setattr(struct dentry *dentry, struct 
iattr *attr)
                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;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to