diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-01 06:56:13 +0100 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-13 15:15:10 +0100 |
commit | 6b24c0d279eacfb499854d09ea7f2b69d1721a29 (patch) | |
tree | 190918f71eb5867fdf755455153fd1e933e8a75a /fs/gfs2/acl.c | |
parent | gfs2: Use kuid_t and kgid_t types where appropriate. (diff) | |
download | linux-6b24c0d279eacfb499854d09ea7f2b69d1721a29.tar.xz linux-6b24c0d279eacfb499854d09ea7f2b69d1721a29.zip |
gfs2: Use uid_eq and gid_eq where appropriate
Where kuid_t values are compared use uid_eq and where kgid_t values
are compared use gid_eq. This is unfortunately necessary because
of the type safety that keeps someone from accidentally mixing
kuids and kgids with other types.
Cc: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/gfs2/acl.c')
-rw-r--r-- | fs/gfs2/acl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index f850020ad906..f69ac0af5496 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c @@ -237,7 +237,7 @@ static int gfs2_xattr_system_set(struct dentry *dentry, const char *name, return -EINVAL; if (type == ACL_TYPE_DEFAULT && !S_ISDIR(inode->i_mode)) return value ? -EACCES : 0; - if ((current_fsuid() != inode->i_uid) && !capable(CAP_FOWNER)) + if (!uid_eq(current_fsuid(), inode->i_uid) && !capable(CAP_FOWNER)) return -EPERM; if (S_ISLNK(inode->i_mode)) return -EOPNOTSUPP; |