[svlug] mounting devpts in a chroot jail

M. Drew Streib dtype at dtype.org
Thu Aug 7 16:55:47 PDT 2003

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.


M. Drew Streib <dtype at dtype.org>
Independent Rambler, Software/Standards/Freedom/Law -- http://dtype.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.svlug.org/archives/svlug/attachments/20030807/477b1f7c/attachment.bin

More information about the svlug mailing list