Return to BSD News archive
Path: sserve!manuel!munnari.oz.au!uunet!mcsun!Germany.EU.net!hcshh!hm
From: hm@hcshh.hcs.de (Hellmuth Michaelis)
Newsgroups: comp.unix.bsd
Subject: /sbin/init patch (was Re: 386BSD - multiple /sbin/init's in process list, solution ?)
Keywords: 386BSD /sbin/init
Message-ID: <1581@hcshh.hcs.de>
Date: 19 Sep 92 15:50:17 GMT
References: <1578@hcshh.hcs.de> <1992Sep18.151351.23495@news.tu-graz.ac.at>
Organization: HCS GmbH, Hamburg, Europe
Lines: 65
In <1992Sep18.151351.23495@news.tu-graz.ac.at> chmr@fstgds01.tu-graz.ac.at (Christoph Robitschko) writes:
>In article <1578@hcshh.hcs.de> hm@hcshh.hcs.de (Hellmuth Michaelis) writes:
>>i (re-) tried to install the /sbin/init program from the original 0.1
>>distribution in various patched levels.
>>
>>all types of init's showed multiples of itself (ca. 10..15) in the
>>process list, constantly killing (disappearing) init's from lower pid's
>>and forking new ones with higher pid's.
>>
>>so i have constantly 10-15 init's running, with constantly incementing
>>process id's (and an increased "background load" ...)
>This can happen if init cannot execute the programs you specified in /etc/ttys.
>However, it should also write a message to /dev/console if this happens.
>Look at your /etc/ttys file and make sure the commands specified therein are
>executable.
that hint did it, thank you christoph!
my entries in /etc/ttys for the pty's looked like this:
ttyp0 none network on secure
(yes, i know this is a security hole ....)
because the man page ttys(5) says:
"..... while "secure" (if "on" is also specified) allows users ...."
what i read from it is, that if you want root logins, you have to specify
"secure" AND "on", what i did. (btw: if you leave out "on" and just write
"secure", you can login as root. is it a bug or a feature ?)
if init finds the flag corresponding to "on", it tries to execute the
program "none", which obviously fails ....
a quick & dirty (because christoph has something in the queue ..) hack-patch
which solves the problem follows:
*** init.c.old Sat Sep 19 17:01:38 1992
--- init.c Sat Sep 19 17:09:16 1992
***************
*** 329,335 ****
char *sargv[NARG];
register char *p = arg, **sp = sargv;
! if(!(tt->tt_status & TTY_ON)) {
tt->tt_pid = -1;
return;
}
--- 329,335 ----
char *sargv[NARG];
register char *p = arg, **sp = sargv;
! if((!(tt->tt_status & TTY_ON)) || (!strncmp(tt->tt_getty,"none",4))) {
tt->tt_pid = -1;
return;
}
hellmuth
--
hellmuth michaelis HCS Hanseatischer Computerservice GmbH hamburg, europe
hm@hcshh.hcs.de tel: +49/40/55903-170 fax: +49/40/5591486