Subject: Re: PR 7170 -- init and /dev/console
To: Michael Lyle <mlyle@recourse.net>
From: David Brownlee <abs@netbsd.org>
List: tech-kern
Date: 04/20/2001 19:24:51
On Fri, 20 Apr 2001, Michael Lyle wrote:

> I was wondering what people think of either adding a special fsid_t
> to fhopen() et al or a new system call to create a fd entry for a given
> major/minor/type set.  This would allow a few things which aren't possible
> now, namely
>
>   - Systems with broken / filesystems would have a much greater chance of
>     making it to single-user mode.
>   - Embedded systems with no filesystem at all would be easier to create.
>   - Moving /dev to a memory-resident filesystem on NFS-rooted boxes will
>     become possible.
>
> There are some security considerations--  I propose that the system call
> would require that the caller have uid 0 credentials and a view of the
> "real" root (e.g. is not in a chroot'd cage).  If there's problems with
> this, we could choose to restrict use of the call to pid 1 only, but
> that does reduce its utility somewhat for the latter two cases.
>
> I'm willing to try my hand at implementing this if this passes design
> review..

	If you can use it in init to setup /dev/console, then couldn't
	you handle the rest of /dev by setting up an mfs and running
	MAKEDEV for the 2nd and third cases? (This would also remove the
	need for the 'root on MSDOSFS' hack in init).

		David/absolute		-- www.netbsd.org: No hype required --