diff options
Diffstat (limited to 'fs/attr.c')
-rw-r--r-- | fs/attr.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -29,13 +29,13 @@ int inode_change_ok(struct inode *inode, struct iattr *attr) | |||
29 | 29 | ||
30 | /* Make sure a caller can chown. */ | 30 | /* Make sure a caller can chown. */ |
31 | if ((ia_valid & ATTR_UID) && | 31 | if ((ia_valid & ATTR_UID) && |
32 | (current->fsuid != inode->i_uid || | 32 | (current_fsuid() != inode->i_uid || |
33 | attr->ia_uid != inode->i_uid) && !capable(CAP_CHOWN)) | 33 | attr->ia_uid != inode->i_uid) && !capable(CAP_CHOWN)) |
34 | goto error; | 34 | goto error; |
35 | 35 | ||
36 | /* Make sure caller can chgrp. */ | 36 | /* Make sure caller can chgrp. */ |
37 | if ((ia_valid & ATTR_GID) && | 37 | if ((ia_valid & ATTR_GID) && |
38 | (current->fsuid != inode->i_uid || | 38 | (current_fsuid() != inode->i_uid || |
39 | (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid)) && | 39 | (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid)) && |
40 | !capable(CAP_CHOWN)) | 40 | !capable(CAP_CHOWN)) |
41 | goto error; | 41 | goto error; |