NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ptyfs and chroot environments



In article <20100401015815.0E21AE4035%pluto.mumble.net@localhost>,
Taylor R Campbell  <campbell+netbsd%mumble.net@localhost> wrote:
>(I am not subscribed to this list, so please cc me in replies.)
>
>ptyfs interacts badly with chroot environments.  Since there can be
>only one ptyfs mount at any given time, a chroot environment cannot
>use ptm(4) to allocate ptys, because it will return /dev/pts/N to the
>userland, which does not (and cannot) exist in the chroot environment.
>
>Consequently, for example, when I try to run xterm inside a chroot
>environment on a system with a ptyfs mounted, it fails.  Testing
>programs in chroot environments is invaluable to me -- it lets me make
>sure that, say, a pkgsrc upgrade or a new X server works before I
>clobber my main file system.  I didn't notice this in NetBSD 4 because
>sysinst didn't start mounting ptyfs by default until NetBSD 5.
>
>I can work around this by unmounting ptyfs, and that's what I'll do
>for now.  Are there any other ways around this?  Is there a danger to
>having multiple ptyfs mounts, or could the ptyfs code be adapted to
>support this?

It needs to be adapted, but it is a non trivial amount of work. 

christos



Home | Main Index | Thread Index | Old Index