[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mint 1.11 beta: ikill()



Mint 1.11's current version ok ikill() is pretty useless, a device driver
could use kerinfo->dostab->p_kill with the same effect.

A device driver should be able to send signals to processes on behalf
of any process (at interrupt time or in an addroottimeout timeout function
any process may be active!).

You may think of this as a security hole but remember only privileged
processes can access the struct kerinfo using Dcntl (DEV_INSTALL) etc.

Second, due to the limited time the system should spend in interrupt
handlers/timeout function calls checksigs() should not be called from
ikill().

The following patch removes these problems.

Kay.

*** signal.c.orig	Sat Aug 20 00:23:36 1994
--- signal.c	Sat Aug 20 00:25:50 1994
***************
*** 112,120 ****
  		if (p == 0 || p->wait_q == ZOMBIE_Q || p->wait_q == TSR_Q) {
  			return EFILNF;
  		}
- 		if (curproc->euid && curproc->ruid != p->ruid) {
- 			return EACCDN;
- 		}
  
  /* if the user sends signal 0, don't deliver it -- for users, signal
   * 0 is a null signal used to test the existence of a process
--- 112,117 ----
***************
*** 123,129 ****
  			post_sig(p, sig);
  		r = 0;
  	}
- 	if (r == 0) check_sigs();
  	return r;
  }
  
--- 120,125 ----