diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-03-04 00:17:15 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-05-03 06:29:34 -0400 |
commit | 8e96e3b7b8407be794ab1fd8e4b332818a358e78 (patch) | |
tree | f27756bb2ec49e586221ac669ea00c68e8a2ee58 /fs/locks.c | |
parent | 72cda3d1ef24ab0a9a89c15e9776ca737b75f45a (diff) |
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) | |||
1445 | struct inode *inode = dentry->d_inode; | 1445 | struct inode *inode = dentry->d_inode; |
1446 | int error; | 1446 | int error; |
1447 | 1447 | ||
1448 | if ((current_fsuid() != inode->i_uid) && !capable(CAP_LEASE)) | 1448 | if ((!uid_eq(current_fsuid(), inode->i_uid)) && !capable(CAP_LEASE)) |
1449 | return -EACCES; | 1449 | return -EACCES; |
1450 | if (!S_ISREG(inode->i_mode)) | 1450 | if (!S_ISREG(inode->i_mode)) |
1451 | return -EINVAL; | 1451 | return -EINVAL; |