From: Ben Gras Date: Fri, 23 Feb 2007 13:01:55 +0000 (+0000) Subject: Don't allow sys_kill to SELF alltogether. X-Git-Tag: v3.1.3~59 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=238ae978baa8b9fd437ca0b88b814f8e3b4b7299;p=minix.git Don't allow sys_kill to SELF alltogether. --- diff --git a/kernel/system/do_kill.c b/kernel/system/do_kill.c index e102bed2f..f5d1d8685 100644 --- a/kernel/system/do_kill.c +++ b/kernel/system/do_kill.c @@ -30,22 +30,15 @@ message *m_ptr; /* pointer to request message */ int sig_nr = m_ptr->SIG_NUMBER; proc_nr_e= m_ptr->SIG_ENDPT; - - if (proc_nr_e == SELF) - proc_nr_e= m_ptr->m_source; if (!isokendpt(proc_nr_e, &proc_nr)) return(EINVAL); - if (sig_nr > _NSIG) return(EINVAL); if (iskerneln(proc_nr)) return(EPERM); /* Set pending signal to be processed by the PM. */ cause_sig(proc_nr, sig_nr); - if (sig_nr == SIGKILL) { + if (sig_nr == SIGKILL) clear_endpoint(proc_addr(proc_nr)); - if(m_ptr->SIG_ENDPT == SELF) - return EDONTREPLY; - } return(OK); }