aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/signal.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 9fb91a32edda..792952381092 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -531,18 +531,18 @@ static int check_kill_permission(int sig, struct siginfo *info,
531 if (!valid_signal(sig)) 531 if (!valid_signal(sig))
532 return error; 532 return error;
533 533
534 error = audit_signal_info(sig, t); /* Let audit system see the signal */ 534 if (info == SEND_SIG_NOINFO || (!is_si_special(info) && SI_FROMUSER(info))) {
535 if (error) 535 error = audit_signal_info(sig, t); /* Let audit system see the signal */
536 return error; 536 if (error)
537 537 return error;
538 error = -EPERM; 538 error = -EPERM;
539 if ((info == SEND_SIG_NOINFO || (!is_si_special(info) && SI_FROMUSER(info))) 539 if (((sig != SIGCONT) ||
540 && ((sig != SIGCONT) || 540 (process_session(current) != process_session(t)))
541 (process_session(current) != process_session(t))) 541 && (current->euid ^ t->suid) && (current->euid ^ t->uid)
542 && (current->euid ^ t->suid) && (current->euid ^ t->uid) 542 && (current->uid ^ t->suid) && (current->uid ^ t->uid)
543 && (current->uid ^ t->suid) && (current->uid ^ t->uid) 543 && !capable(CAP_KILL))
544 && !capable(CAP_KILL))
545 return error; 544 return error;
545 }
546 546
547 return security_task_kill(t, info, sig, 0); 547 return security_task_kill(t, info, sig, 0);
548} 548}