aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xattr.c')
-rw-r--r--fs/xattr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xattr.c b/fs/xattr.c
index 4523aca79659..a44fd92caca3 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -60,8 +60,7 @@ xattr_permission(struct inode *inode, const char *name, int mask)
60 if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode)) 60 if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode))
61 return -EPERM; 61 return -EPERM;
62 if (S_ISDIR(inode->i_mode) && (inode->i_mode & S_ISVTX) && 62 if (S_ISDIR(inode->i_mode) && (inode->i_mode & S_ISVTX) &&
63 (mask & MAY_WRITE) && (current->fsuid != inode->i_uid) && 63 (mask & MAY_WRITE) && !is_owner_or_cap(inode))
64 !capable(CAP_FOWNER))
65 return -EPERM; 64 return -EPERM;
66 } 65 }
67 66