Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Feb 2008 17:16:17 +0000
From:      xorquewasp@googlemail.com
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Anybody have a patch for pdksh derivatives, for jails?
Message-ID:  <20080225171617.GA9177@logik.internal.network>
In-Reply-To: <20080225142412.hqn9n6kagw0w0w4o@webmail.leidinger.net>
References:  <5a08be760802241042x2cd93d63of5787a744e745fe5@mail.gmail.com> <20080225142412.hqn9n6kagw0w0w4o@webmail.leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 20080225 14:24:12, Alexander Leidinger wrote:
> Quoting cali clarke <xorquewasp@googlemail.com> (from Sun, 24 Feb 2008 
>> Note that also, this problem does NOT occur if you use ssh
>> to enter the jail as I believe ssh handles tty allocation in
>> advance.
>
> You don't give enough info. I assume you talk about a login into the host 
> system and then doing a "jexec X pdksh" to login into a jail. The important 
> question here is the how you login into the host system.

Hi.

Yes, exactly that. A login on the host system followed by a jexec of *ksh OR
a jexec of another shell such as /bin/sh followed by an ordinary exec
of any *ksh.

>> I wondered if anybody had patched their *ksh to workaround
>> this problem?
>
> So far it is not clear that the bug is within the *ksh. It may be also the 
> case that the problem should be fixed somewhere else.

The problem appears to be that *ksh does various checks to determine if it
can run with job control and one of those checks is based on whether or not
it can successfully open /dev/tty, which can't happen in a jail (device
busy). The other shells in base such as /bin/sh and /bin/csh don't appear
to make these checks and therefore just work. I could of course patch *ksh
to ignore the fact that it can't open /dev/tty but I'm unsure about what
else this would break in the shell due to the hard-to-read source - hence
my question about whether or not anybody else had already patched it.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080225171617.GA9177>