Don't allow sys_kill to SELF alltogether.
This commit is contained in:
parent
a9f2f36f46
commit
238ae978ba
|
@ -31,21 +31,14 @@ message *m_ptr; /* pointer to request message */
|
||||||
|
|
||||||
proc_nr_e= m_ptr->SIG_ENDPT;
|
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 (!isokendpt(proc_nr_e, &proc_nr)) return(EINVAL);
|
||||||
|
|
||||||
if (sig_nr > _NSIG) return(EINVAL);
|
if (sig_nr > _NSIG) return(EINVAL);
|
||||||
if (iskerneln(proc_nr)) return(EPERM);
|
if (iskerneln(proc_nr)) return(EPERM);
|
||||||
|
|
||||||
/* Set pending signal to be processed by the PM. */
|
/* Set pending signal to be processed by the PM. */
|
||||||
cause_sig(proc_nr, sig_nr);
|
cause_sig(proc_nr, sig_nr);
|
||||||
if (sig_nr == SIGKILL) {
|
if (sig_nr == SIGKILL)
|
||||||
clear_endpoint(proc_addr(proc_nr));
|
clear_endpoint(proc_addr(proc_nr));
|
||||||
if(m_ptr->SIG_ENDPT == SELF)
|
|
||||||
return EDONTREPLY;
|
|
||||||
}
|
|
||||||
return(OK);
|
return(OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue