Re: The kernel should try /sbin/sulogin first.

Bryn Paul Arnold Jones (bpaj@gytha.demon.co.uk)
Sat, 18 Jan 1997 13:13:36 +0000 (GMT)


On Sat, 18 Jan 1997, Mike Kilburn wrote:

>
>
> On Fri, 17 Jan 1997, Nicolas Lichtmaier wrote:
>
> > - execve("/sbin/init",argv_init,envp_init);
> > + execve("/sbin/sulogin",argv_init,envp_init);
>
> I dont think a fundamental change like this is a good idea
> right now. A lot of people use Linux for things that depend
> on the previous behavior. Besides, this adds no addition
> security, just causes more wasted man hours changing to
> accommodate the new behavior.
>

That patch fragment is misleading, if you look again, the removed line is
moved closer to the top of the list (because it's the one that the
filesystem standard sais should exist)

--- main.c.orig Fri Jan 17 20:19:23 1997
+++ main.c Fri Jan 17 20:21:17 1997
@@ -1013,9 +1013,10 @@
*/

execve(execute_command,argv_init,envp_init);
+ execve("/sbin/init",argv_init,envp_init);
execve("/etc/init",argv_init,envp_init);
execve("/bin/init",argv_init,envp_init);
- execve("/sbin/init",argv_init,envp_init);
+ execve("/sbin/sulogin",argv_init,envp_init);
execve("/bin/sh",argv_init,envp_init);
panic("No init found. Try passing init= option to kernel.");
}

Rember that the kernel is trying to start init, it tries each one in turn
until one runs or it panics. The idea of putting /sbin/sulogin in there
before /bin/sh is that you proberbly don't want to give anyone
passing shell access at that level (ie basically root access), just
because something happened to init. Btw sulogin sais this:

root@gytha:~# sulogin
Give root password for maintenance
(or type Control-D for normal startup):

Which may be a bit misleading, but at least you arn't giving a shell
to anyone passing ....

Bryn

--
PGP key pass phrase forgotten,   \ Overload -- core meltdown sequence 
again :( and I don't care ;)      |            initiated.
                                 / This space is intentionally left   
                                |  blank, apart from this text ;-)
                                 \____________________________________