Messages in this thread | | | Date | Sat, 22 Nov 2008 23:48:46 +0100 | From | "Vegard Nossum" <> | Subject | Re: [RFC][PATCH] sysrq-j: emergency shell |
| |
On Sat, Nov 22, 2008 at 8:07 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote: >> > It seems that keyboard input will go to the shell only half of the >> > time; the other half goes to whatever program was running there in >> > the first place. I tried to kill the other users of the TTY using >> > TIOCSCTTY, but it seems not to have worked. Any ideas? >> >> This should go in together with CVE number attached. > > TIOCSTTY isn't supposed to kill anything.
Oops, by killing, I meant simply to take it exclusively:
EPERM, unless the caller is root and arg equals 1, in which case the tty is stolen, and all processes that had it as controlling tty lose it.
But I realize that this does not necessarily mean that the other processes cannot read from or write to the tty anymore. Do you know how to do that? :-)
Vegard
-- "The animistic metaphor of the bug that maliciously sneaked in while the programmer was not looking is intellectually dishonest as it disguises that the error is the programmer's own creation." -- E. W. Dijkstra, EWD1036
| |