forked from Minki/linux
ecryptfs: allow lower fs to interpret ATTR_KILL_S*ID
Make sure ecryptfs doesn't trip the BUG() in notify_change. This also allows the lower filesystem to interpret ATTR_KILL_S*ID in its own way. Signed-off-by: Jeff Layton <jlayton@redhat.com> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Neil Brown <neilb@suse.de> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Chris Mason <chris.mason@oracle.com> Cc: Jeff Mahoney <jeffm@suse.com> Cc: "Vladimir V. Saveliev" <vs@namesys.com> Cc: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Steven French <sfrench@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ef1d7151d2
commit
1ac564ecab
@ -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);
|
||||
out:
|
||||
fsstack_copy_attr_all(inode, lower_inode, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user