Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120659
b: refs/heads/master
c: b421273
h: refs/heads/master
i:
  120657: 2a1b8c1
  120655: 48bce6f
v: v3
  • Loading branch information
David Howells authored and James Morris committed Nov 13, 2008
1 parent 079a0cf commit 0fc704b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef81ee9855d6c605ed6090a8018c78572cc68b5c
refs/heads/master: b4212737a39e4cfb0fb66769acbc0bd182a93253
5 changes: 3 additions & 2 deletions trunk/arch/mips/kernel/mips-mt-fpaff.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len,
int retval;
struct task_struct *p;
struct thread_info *ti;
uid_t euid;

if (len < sizeof(new_mask))
return -EINVAL;
Expand All @@ -76,9 +77,9 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len,
*/
get_task_struct(p);

euid = current_euid();
retval = -EPERM;
if ((current->euid != p->euid) && (current->euid != p->uid) &&
!capable(CAP_SYS_NICE)) {
if (euid != p->euid && euid != p->uid && !capable(CAP_SYS_NICE)) {
read_unlock(&tasklist_lock);
goto out_unlock;
}
Expand Down

0 comments on commit 0fc704b

Please sign in to comment.