[svlug] mounting devpts in a chroot jail
Scott Hess
scott at doubleu.com
Thu Aug 7 16:59:10 PDT 2003
I had a perhaps-similar problem with the syslog socket in chroots. I did
the following:
mount --bind /dev/log /home/chroot/dev/log
Later,
scott
On Thu, 7 Aug 2003, M. Drew Streib wrote:
> I've scoured documentation and tinkered with this to no avail, so I
> bring a "help me" on topic post to svlug. :)
>
> I have an app (it is a nethack game launcher app) that runs from
> within a chroot jail, but needs to get access to devpts device
> files _after_ the chroot. (I could get around this if there was
> a way to get a slave device with something other than ptyname(),
> but I think there isn't.)
>
> This should be easy enough if devpts can be mounted inside of my
> chroot jail as well, but despite mounting it with all the proper
> options, the pts devices just don't show up in the new directory.
>
> 1) Anyone know if devpts can even be mounted more than once? It
> seems there should be no real reason why it shouldn't.
>
> 2) If (1) is yes, what am I doing wrong? I'm mounting with the _exact_
> same options as the first devpts mounting, including the same gid
> and mode options.
>
> 3) If (1) is no, is there some way other than ptyname (and the
> appropriate devpts file) to find and open a slave device for a
> given master? (fwiw, I am able to open the master device before
> the chroot(), but the slave must come after, as it occurs after
> a fork in which one process records the tty session, and the other
> is the one the user exists in.)
>
> Thanks in advance. I'm stumped so far, but will continue my research.
>
> -drew
>
>
More information about the svlug
mailing list