From f9f0622c1152a32ae1aeba4e38782452653715bb Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Thu, 18 Oct 2007 03:05:17 -0700 Subject: [PATCH] --- yaml --- r: 71137 b: refs/heads/master c: 1ac564ecabc777636cf4eb88840802d7dc57d286 h: refs/heads/master i: 71135: 080c9a034b55cdb6157e5b225efda4307343330d v: v3 --- [refs] | 2 +- trunk/fs/ecryptfs/inode.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 0f38d40e8f0e..47750ec5028e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ef1d7151d2901295278d5aada39c547ed8601419 +refs/heads/master: 1ac564ecabc777636cf4eb88840802d7dc57d286 diff --git a/trunk/fs/ecryptfs/inode.c b/trunk/fs/ecryptfs/inode.c index 5701f816faf4..0b1ab016fa2e 100644 --- a/trunk/fs/ecryptfs/inode.c +++ b/trunk/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); out: fsstack_copy_attr_all(inode, lower_inode, NULL);