Re: Anybody have a patch for pdksh derivatives, for jails?



On 20080225 14:24:12, Alexander Leidinger wrote:
Quoting cali clarke <xorquewasp@xxxxxxxxxxxxxx> (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.

_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages