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/ioprio.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/ioprio.c')
-rw-r--r-- | fs/ioprio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ioprio.c b/fs/ioprio.c index 2072e41785d2..5e6dbe8958fc 100644 --- a/fs/ioprio.c +++ b/fs/ioprio.c | |||
@@ -37,8 +37,8 @@ int set_task_ioprio(struct task_struct *task, int ioprio) | |||
37 | 37 | ||
38 | rcu_read_lock(); | 38 | rcu_read_lock(); |
39 | tcred = __task_cred(task); | 39 | tcred = __task_cred(task); |
40 | if (tcred->uid != cred->euid && | 40 | if (!uid_eq(tcred->uid, cred->euid) && |
41 | tcred->uid != cred->uid && !capable(CAP_SYS_NICE)) { | 41 | !uid_eq(tcred->uid, cred->uid) && !capable(CAP_SYS_NICE)) { |
42 | rcu_read_unlock(); | 42 | rcu_read_unlock(); |
43 | return -EPERM; | 43 | return -EPERM; |
44 | } | 44 | } |