diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-03-04 09:17:15 +0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-05-03 14:29:34 +0400 |
commit | 8e96e3b7b8407be794ab1fd8e4b332818a358e78 (patch) | |
tree | f27756bb2ec49e586221ac669ea00c68e8a2ee58 /fs/locks.c | |
parent | 72cda3d1ef24ab0a9a89c15e9776ca737b75f45a (diff) | |
download | linux-8e96e3b7b8407be794ab1fd8e4b332818a358e78.tar.xz |
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.c | 2 |
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; |