Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Nov 1998 14:56:19 -0800 (PST)
From:      Julian Elischer <julian@whistle.com>
To:        zhihuizhang <bf20761@binghamton.edu>
Cc:        Archie Cobbs <archie@whistle.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: More questions on DEVFS
Message-ID:  <Pine.BSF.3.95.981113145427.19321G-100000@current1.whistle.com>
In-Reply-To: <Pine.SOL.L3.93.981113162310.22911A-100000@bingsun2>

next in thread | previous in thread | raw e-mail | index | archive | help


On Fri, 13 Nov 1998, zhihuizhang wrote:

> 
> > > (1) As I understand it, special files can be created only by superuser via
> > > mknod and file systems can only be mounted by superuser. I do not see any
> > > reason why the superuser will mount the device file system multiple times
> > > and possibly at different mount points. 
> > 
> > You might want to create a chroot()'d sub-space of your filesystem,
> > and put devices in there for example..
> > 
> After thinking for quite a while, I still have two confusions:
> 
> (1) I read the source code of chroot() in file vfs_syscalls.c.  It takes a
> path and change the fd_rdir (root directory) of the calling process. How
> can the superuser process change the root directory of any other process?

Chroot is only valid for your own process, and its descendants

> 
> (2) By saying "put devices in there..", I guess it means that the
> superuser mount the special device at some directory under the new root. 
> If we set up root directories for several processes, then we may need to
> mount a certain device used by these processes several times.  DEVFS can
> be mounted multiple times to achieve this.  However, multiple mounts of
> a normal file system are NOT allowed.  Am I right? 

That is correct though I think possibly multiple /proc filesystems
might be ok..



> 
> Thanks for your response.
> 
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.981113145427.19321G-100000>