|
@@ -1385,7 +1385,8 @@ static int check_prlimit_permission(struct task_struct *task)
|
|
|
const struct cred *cred = current_cred(), *tcred;
|
|
|
|
|
|
tcred = __task_cred(task);
|
|
|
- if ((cred->uid != tcred->euid ||
|
|
|
+ if (current != task &&
|
|
|
+ (cred->uid != tcred->euid ||
|
|
|
cred->uid != tcred->suid ||
|
|
|
cred->uid != tcred->uid ||
|
|
|
cred->gid != tcred->egid ||
|