Linuxthreads uses not only signal 32 but several signals >= 32.

PR:		kern/72922
Submitted by:	Andriy Gapon <avg@icyb.net.ua>
This commit is contained in:
Maxim Sobolev 2005-03-18 11:08:55 +00:00
parent 60c5621a8d
commit f9cd63d436

View File

@ -1524,15 +1524,15 @@ p_cansignal(struct thread *td, struct proc *p, int signum)
if (signum == SIGCONT && td->td_proc->p_session == p->p_session)
return (0);
/*
* Some compat layers use SIGTHR for communications between
* different kernel threads of the same process, so that
* they are expecting that it's always possible to deliver
* it, even for suid applications where cr_cansignal() can
* Some compat layers use SIGTHR and higher signals for
* communication between different kernel threads of the same
* process, so that they expect that it's always possible to
* deliver them, even for suid applications where cr_cansignal() can
* deny such ability for security consideration. It should be
* pretty safe to do since the only way to create two processes
* with the same p_leader is via rfork(2).
*/
if (signum == SIGTHR && td->td_proc->p_leader != NULL &&
if (signum >= SIGTHR && td->td_proc->p_leader != NULL &&
td->td_proc->p_leader == p->p_leader)
return (0);