summaryrefslogtreecommitdiffstats
path: root/fs/locks.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-03-04 06:17:15 +0100
committerEric W. Biederman <ebiederm@xmission.com>2012-05-03 12:29:34 +0200
commit8e96e3b7b8407be794ab1fd8e4b332818a358e78 (patch)
treef27756bb2ec49e586221ac669ea00c68e8a2ee58 /fs/locks.c
parentuserns: Convert in_group_p and in_egroup_p to use kgid_t (diff)
downloadlinux-8e96e3b7b8407be794ab1fd8e4b332818a358e78.tar.xz
linux-8e96e3b7b8407be794ab1fd8e4b332818a358e78.zip
userns: Use uid_eq gid_eq helpers when comparing kuids and kgids in the vfs
Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 637694bf3a03..3e946cda98c6 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1445,7 +1445,7 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp)
struct inode *inode = dentry->d_inode;
int error;
- if ((current_fsuid() != inode->i_uid) && !capable(CAP_LEASE))
+ if ((!uid_eq(current_fsuid(), inode->i_uid)) && !capable(CAP_LEASE))
return -EACCES;
if (!S_ISREG(inode->i_mode))
return -EINVAL;