From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 25 17:16:26 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 600BD16A401 for ; Mon, 25 Feb 2008 17:16:26 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.freebsd.org (Postfix) with ESMTP id E097E13C468 for ; Mon, 25 Feb 2008 17:16:24 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: by nf-out-0910.google.com with SMTP id b2so946325nfb.33 for ; Mon, 25 Feb 2008 09:16:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:cc:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to; bh=id7gJxzah7hm9h3dKnla+tuXsy9UrtNl9i5xIFhTWiI=; b=uA/9pUq1hLy0E45N2/bl8woGoKjocwUJ9d1TBuOPqXztbjsxfuZ3VVmG3NkHIHjUY7FguUQQv4VyAXLac6wwDrlIDgafhCnHqIvRcjDiNvmfGE6Rt+F+qJwa9sKrCJvP5VWELu7qfoBYgpXKigW+FPOtgxf0MR/guV3Pzg3HzI4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to; b=XubfFLyRdPEfqTmmp01gQ9jfEEqkmH6pM9dYx1gAb4JApvyt1sS+dgMXIJEt0AIZyrudpIyG94gF0kwzbjJWAfI2IciAv/cpi3cHWml2O1O3+DhSu57NRnYv33f1HQ833Tvw5oGDBHAgT98DKAM79bA0I5kUqEH069ySRf0sfjs= Received: by 10.82.167.5 with SMTP id p5mr6423208bue.38.1203959783852; Mon, 25 Feb 2008 09:16:23 -0800 (PST) Received: from logik.internal.network ( [81.86.41.187]) by mx.google.com with ESMTPS id y34sm9133977iky.6.2008.02.25.09.16.21 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Feb 2008 09:16:22 -0800 (PST) Received: by logik.internal.network (Postfix, from userid 11001) id 358D95C82; Mon, 25 Feb 2008 17:16:18 +0000 (UTC) Date: Mon, 25 Feb 2008 17:16:17 +0000 From: xorquewasp@googlemail.com To: Alexander Leidinger Message-ID: <20080225171617.GA9177@logik.internal.network> References: <5a08be760802241042x2cd93d63of5787a744e745fe5@mail.gmail.com> <20080225142412.hqn9n6kagw0w0w4o@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080225142412.hqn9n6kagw0w0w4o@webmail.leidinger.net> Cc: freebsd-hackers@freebsd.org Subject: Re: Anybody have a patch for pdksh derivatives, for jails? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2008 17:16:26 -0000 On 20080225 14:24:12, Alexander Leidinger wrote: > Quoting cali clarke (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.