From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 26 20:22:11 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 A30B6106566C for ; Tue, 26 Feb 2008 20:22:11 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.189]) by mx1.freebsd.org (Postfix) with ESMTP id 2953513C4EF for ; Tue, 26 Feb 2008 20:22:10 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: by mu-out-0910.google.com with SMTP id w9so3030817mue.6 for ; Tue, 26 Feb 2008 12:22:09 -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=MM4m5rfxAVuv3KbT1RFtz0v4sh2QUOD9c9iJqgaHB34=; b=cj7pJWwVOIYWMzJCuYY8+kClSDMfBAFi0f433dofmnHp7lmOIo7lwTxjknuyWw/fO/NpRgG2FjraG/VZg63ZbwE7NR4OFMu3UgjimSErwk6VzQEV8HjcVOK97zMB+gNOZ7SVCd9JQAe79xYUHd5ImSKTThAPA4gbnXcbtKsVDT8= 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=HaDeaC7lRxUCDFsmOcyDVpB/MoUtSeahqSAmykNJM0ZVmImVhtqgbRzDnfC5imVM0u27QqFpKlHiGTDSQnXIslyvKtdQK+jDA5LMMM7+PEwiFfRiNykluRn7jej67YPjGh7ETzMA8FtR/x3nIF++ykfkMh8BYUQysxK8dhXXkYE= Received: by 10.82.151.14 with SMTP id y14mr9961879bud.19.1204057329389; Tue, 26 Feb 2008 12:22:09 -0800 (PST) Received: from logik.internal.network ( [81.86.41.187]) by mx.google.com with ESMTPS id y34sm11816943iky.6.2008.02.26.12.22.06 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Feb 2008 12:22:08 -0800 (PST) Received: by logik.internal.network (Postfix, from userid 11001) id 00F205D2E; Tue, 26 Feb 2008 20:22:02 +0000 (UTC) Date: Tue, 26 Feb 2008 20:22:02 +0000 From: xorquewasp@googlemail.com To: Tom Evans Message-ID: <20080226202202.GA96964@logik.internal.network> References: <5a08be760802241042x2cd93d63of5787a744e745fe5@mail.gmail.com> <1204039044.2126.121.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1204039044.2126.121.camel@localhost> 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: Tue, 26 Feb 2008 20:22:11 -0000 On 20080226 15:17:24, Tom Evans wrote: > Running something like 'jexec 1 /bin/sh' won't allow you to allocate a > tty. If instead you enable sshd inside the jail, and ssh into the jail, > sshd will allocate you a tty, and everything will work normally. Hi. As I mentioned in my first email, the issue isn't precisely that a tty isn't allocated, it's that *ksh does extra pedantic checking to discover whether or not it really does have a controlling terminal. The restrictions that exist in jails (eg. not being able to open /dev/tty) cause the shell to believe that it doesn't have a controlling terminal. The shells in base don't do this extra checking and therefore work fine. This is simply an OS specific artifact that the *ksh authors couldn't possibly have forseen! Given that it seems nobody has patched *ksh to work in a jail, I'll try myself. I expect the easiest way will be to add a command line flag that says "I really do have a controlling terminal". Thanks anyway.