Commit:     1ac564ecabc777636cf4eb88840802d7dc57d286
Parent:     ef1d7151d2901295278d5aada39c547ed8601419
Author:     Jeff Layton <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 03:05:17 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Oct 18 14:37:21 2007 -0700

    ecryptfs: allow lower fs to interpret ATTR_KILL_S*ID
    Make sure ecryptfs doesn't trip the BUG() in notify_change.  This also 
    the lower filesystem to interpret ATTR_KILL_S*ID in its own way.
    Signed-off-by: Jeff Layton <[EMAIL PROTECTED]>
    Cc: Michael Halcrow <[EMAIL PROTECTED]>
    Cc: Christoph Hellwig <[EMAIL PROTECTED]>
    Cc: Neil Brown <[EMAIL PROTECTED]>
    Cc: "J. Bruce Fields" <[EMAIL PROTECTED]>
    Cc: Chris Mason <[EMAIL PROTECTED]>
    Cc: Jeff Mahoney <[EMAIL PROTECTED]>
    Cc: "Vladimir V. Saveliev" <[EMAIL PROTECTED]>
    Cc: Josef 'Jeff' Sipek <[EMAIL PROTECTED]>
    Cc: Trond Myklebust <[EMAIL PROTECTED]>
    Cc: Steven French <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/ecryptfs/inode.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 5701f81..0b1ab01 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -914,6 +914,14 @@ static int ecryptfs_setattr(struct dentry *dentry, struct 
iattr *ia)
                if (rc < 0)
                        goto out;
+       /*
+        * mode change is for clearing setuid/setgid bits. Allow lower fs
+        * to interpret this in its own way.
+        */
+       if (ia->ia_valid & (ATTR_KILL_SUID | ATTR_KILL_SGID))
+               ia->ia_valid &= ~ATTR_MODE;
        rc = notify_change(lower_dentry, ia);
        fsstack_copy_attr_all(inode, lower_inode, NULL);
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