The patch titled
     unionfs: fix unionfs_setattr to handle ATTR_KILL_S*ID
has been added to the -mm tree.  Its filename is
     unionfs-fix-unionfs_setattr-to-handle-attr_kill_sid.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: unionfs: fix unionfs_setattr to handle ATTR_KILL_S*ID
From: Jeff Layton <[EMAIL PROTECTED]>

Don't allow unionfs_setattr to trip the BUG() in notify_change. Clear
ATTR_MODE if the either ATTR_KILL_S*ID is set. This also allows the
lower filesystem to interpret these bits in its own way.

Signed-off-by: Jeff Layton <[EMAIL PROTECTED]>
Cc: Josef 'Jeff' Sipek <[EMAIL PROTECTED]>
Cc: Christoph Hellwig <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 fs/unionfs/inode.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff -puN 
fs/unionfs/inode.c~unionfs-fix-unionfs_setattr-to-handle-attr_kill_sid 
fs/unionfs/inode.c
--- a/fs/unionfs/inode.c~unionfs-fix-unionfs_setattr-to-handle-attr_kill_sid
+++ a/fs/unionfs/inode.c
@@ -1021,6 +1021,13 @@ static int unionfs_setattr(struct dentry
        bend = dbend(dentry);
        inode = dentry->d_inode;
 
+       /*
+        * mode change is for clearing setuid/setgid. Allow lower filesystem
+        * to reinterpret it in its own way.
+        */
+       if (ia->ia_valid & (ATTR_KILL_SUID | ATTR_KILL_SGID))
+               ia->ia_valid &= ~ATTR_MODE;
+
        for (bindex = bstart; (bindex <= bend) || (bindex == bstart);
             bindex++) {
                lower_dentry = unionfs_lower_dentry_idx(dentry, bindex);
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

git-cifs.patch
git-nfs.patch
ecryptfs-allow-lower-fs-to-interpret-attr_kill_sid.patch
knfsd-only-set-attr_kill_sid-if-attr_mode-isnt-being-explicitly-set.patch
reiserfs-turn-of-attr_kill_sid-at-beginning-of-reiserfs_setattr.patch
unionfs-fix-unionfs_setattr-to-handle-attr_kill_sid.patch
vfs-make-notify_change-pass-attr_kill_sid-to-setattr-operations.patch
nfs-if-attr_kill_sid-bits-are-set-then-skip-mode-change.patch
cifs-ignore-mode-change-if-its-just-for-clearing-setuid-setgid-bits.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to