diff options
-rw-r--r-- | 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 5701f816faf4..0b1ab016fa2e 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) | |||
914 | if (rc < 0) | 914 | if (rc < 0) |
915 | goto out; | 915 | goto out; |
916 | } | 916 | } |
917 | |||
918 | /* | ||
919 | * mode change is for clearing setuid/setgid bits. Allow lower fs | ||
920 | * to interpret this in its own way. | ||
921 | */ | ||
922 | if (ia->ia_valid & (ATTR_KILL_SUID | ATTR_KILL_SGID)) | ||
923 | ia->ia_valid &= ~ATTR_MODE; | ||
924 | |||
917 | rc = notify_change(lower_dentry, ia); | 925 | rc = notify_change(lower_dentry, ia); |
918 | out: | 926 | out: |
919 | fsstack_copy_attr_all(inode, lower_inode, NULL); | 927 | fsstack_copy_attr_all(inode, lower_inode, NULL); |