|
@@ -642,7 +642,7 @@ static inline bool si_fromuser(const struct siginfo *info)
|
|
|
static int check_kill_permission(int sig, struct siginfo *info,
|
|
|
struct task_struct *t)
|
|
|
{
|
|
|
- const struct cred *cred = current_cred(), *tcred;
|
|
|
+ const struct cred *cred, *tcred;
|
|
|
struct pid *sid;
|
|
|
int error;
|
|
|
|
|
@@ -656,8 +656,10 @@ static int check_kill_permission(int sig, struct siginfo *info,
|
|
|
if (error)
|
|
|
return error;
|
|
|
|
|
|
+ cred = current_cred();
|
|
|
tcred = __task_cred(t);
|
|
|
- if ((cred->euid ^ tcred->suid) &&
|
|
|
+ if (!same_thread_group(current, t) &&
|
|
|
+ (cred->euid ^ tcred->suid) &&
|
|
|
(cred->euid ^ tcred->uid) &&
|
|
|
(cred->uid ^ tcred->suid) &&
|
|
|
(cred->uid ^ tcred->uid) &&
|