From 238ae978baa8b9fd437ca0b88b814f8e3b4b7299 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Fri, 23 Feb 2007 13:01:55 +0000 Subject: [PATCH] Don't allow sys_kill to SELF alltogether. --- kernel/system/do_kill.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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); } -- 2.44.0