Re: Booting into /bin/bash

From: Ion Badulescu (ionut@cs.columbia.edu)
Date: Tue Sep 12 2000 - 20:52:43 EST


On Tue, 12 Sep 2000, Ion Badulescu wrote:

> Maybe I'll play with main.c and see what happens if I force /dev/console
> to become the controlling tty for init. Hmm... That could be dangerous for
> init. Maybe a better idea would be to hack init so that it gives any
> program started from inittab /dev/console as the controlling tty.
>
> You're the sysvinit maintainer, right? :) What do you think of this idea?

... and init already does the above. :-) Except for one case: the
emergency shell doesn't get a controlling tty. The first mini-patch below
takes care of that problem.

This still doesn't solve the original problem, i.e. init (or whatever you
pass as init) still doesn't get a controlling tty from the kernel.
However, since init appears to be safe from these issues, it it fairly
trivial to fix this in the kernel; the second patch below takes care of
it. The patch is against 2.2.17 but will apply against pretty much any 2.2
and 2.4 kernel. It's is for i386 only, but the fixup for other
architectures is extremely obvious.

Ion

-- 
  It is better to keep your mouth shut and be thought a fool,
            than to open it and remove all doubt.



- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:19 EST