Re: openpty() and jail in RELENG_7



On Wed, 2007-11-07 at 16:21 +0200, Vlad GALU wrote:
On 11/7/07, Tom Evans <tevans.uk@xxxxxxxxxxxxxx> wrote:
On Tue, 2007-11-06 at 22:19 +0200, Dan Epure wrote:
Hi All,
<snip>
I think the problem is related to restrictions imposed by the jail.

Please advise.

Gepu

This is because you haven't been allocated a pty inside your jail.
Enable sshd inside your jail, ssh to your jail (which will allocate you
a pty). Then from inside your jail, you can use any pty-using
application you wish.

I am presuming you are doing something like 'jexec 1 /bin/csh' or
similar, and I'm only really repeating Xin Li's advice to me[1].

Cheers

Tom

[1]
http://lists.freebsd.org/pipermail/freebsd-jail/2007-October/000106.html



I'm chiming in to signal a possibly related problem. Logging in
and out via sshd behaves normally (ie: the ptys are cleaned up
accordingly) but opening virtual consoles in screen and then closing
them does not, thus leading to starvation.


I can confirm this also occurs in our jails on 6.2-RELEASE-p5.

Tom

Attachment: signature.asc
Description: This is a digitally signed message part



Relevant Pages

  • [ed@fxq.nl: Request for PTY/devfs changes]
    ... aren't bound to a real pty controller. ... The pts code also suffers from this bug. ... generic would be to add a flag to cdevsw's d_flags called D_PRISONOWNED. ... lookup's and readdir's inside a jail don't ...
    (freebsd-arch)
  • Re: Anybody have a patch for pdksh derivatives, for jails?
    ... If instead you enable sshd inside the jail, and ssh into the jail, ... sshd will allocate you a tty, ...
    (freebsd-hackers)
  • Request for PTY/devfs changes
    ... There are a couple of bugs in the FreeBSD kernel that aren't hard to ... aren't bound to a real pty controller. ... generic would be to add a flag to cdevsw's d_flags called D_PRISONOWNED. ... lookup's and readdir's inside a jail don't ...
    (freebsd-current)
  • Re: openpty() and jail in RELENG_7
    ... The problem is inside the jail openpty() can not allocate the pty: ... debug1: Entering interactive session for SSH2. ...
    (freebsd-stable)
  • Re: openpty() and jail in RELENG_7
    ... The problem is inside the jail openpty() can not allocate the pty: ... debug1: Entering interactive session for SSH2. ...
    (freebsd-stable)