27 August 2008 c. 17:33:33 Heinrich Rebehn wrote:
> Josh Grosse wrote:
> > On Wed, 27 Aug 2008 14:54:06 +0200, Otto Moerbeek wrote
> >
> >> Likely /tmp is mounted nodev
> >
> > I don't think so. I can replicate Leo's exact sequence when /tmp is
> > mounted dev. If it is mounted nodev, you get warning messages that
> > there is no controlling tty when you start the shell. With dev, you
> > get no warning message and the chrooted environment works as
> > expected, except for the result from tty(1).
>
> # mkdir -p /tmp/root/var/run
> # cp -p /var/run/dev.db /tmp/root/var/run
> # chroot /tmp/root sh
> # tty
> /dev/ttyp0
or mount_portal /etc/mychroot.conf /tmp/root
where /etc/mychroot.conf consists of:
dev/ file
I dunno if mount_portal should be considered stable and secure enough,
though. It's source code isn't that complicated, though.
--
Best wishes,
Vadim Zhukov