Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Nov 1998 16:37:47 -0500 (EST)
From:      zhihuizhang <bf20761@binghamton.edu>
To:        Archie Cobbs <archie@whistle.com>
Cc:        julian@whistle.com, freebsd-hackers@FreeBSD.ORG
Subject:   Re: More questions on DEVFS
Message-ID:  <Pine.SOL.L3.93.981113162310.22911A-100000@bingsun2>
In-Reply-To: <199811122233.OAA20678@bubba.whistle.com>

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

> > (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?

(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? 

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.SOL.L3.93.981113162310.22911A-100000>