From owner-freebsd-emulation@FreeBSD.ORG Tue Mar 16 00:46:49 2010 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE54C106566C for ; Tue, 16 Mar 2010 00:46:49 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from stealth.jnielsen.net (jnielsendotnet-1-pt.tunnel.tserv13.ash1.ipv6.he.net [IPv6:2001:470:7:4d5::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3692F8FC08 for ; Tue, 16 Mar 2010 00:46:49 +0000 (UTC) Received: from shadow.local (shadow.local [192.168.2.12]) by stealth.jnielsen.net (8.14.4/8.14.4) with ESMTP id o2G0khUB029697; Mon, 15 Mar 2010 20:46:43 -0400 (EDT) (envelope-from lists@jnielsen.net) From: John Nielsen To: Ed Schouten Date: Mon, 15 Mar 2010 20:46:05 -0400 User-Agent: KMail/1.9.10 References: <201003021325.27197.lists@jnielsen.net> <20100307113538.00007555@unknown> <20100307104437.GM8200@hoeg.nl> In-Reply-To: <20100307104437.GM8200@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201003152046.05915.lists@jnielsen.net> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (stealth.jnielsen.net [192.168.2.10]); Mon, 15 Mar 2010 20:46:44 -0400 (EDT) Cc: freebsd-emulation@freebsd.org Subject: Re: linux-only jail possible? X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 00:46:49 -0000 On Sunday 07 March 2010 05:44:37 am Ed Schouten wrote: > * Alexander Leidinger wrote: > > On Sat, 6 Mar 2010 19:15:12 +0100 Ed Schouten wrote: > > > I am still in doubt what to do. Maybe we could consider committing > > > a patch like this: > > > > [...] > > > > > This is a bit more complete. What it does, is that it creates a > > > symlink from /proc/%d/fd to /dev/fd, only if the calling process > > > matches. Then when you mount fdescfs on /dev/fd, it also does the > > > right thing, because it will always readlink() on a character > > > device, which also returns an error code. > > > > > > Comments, suggestions anyone? > > > > Looks better than the one before. :) > > Great. Just committed it to SVN: > > http://svn.freebsd.org/viewvc/base?view=revision&revision=204825 I finally tried the patch from SVN today and it does NOT resolve the openpty issue on FreeBSD 8-STABLE amd64 + CentOS 5.4 i386 jail + OpenSSH 4.3p2. I still (or again) get the "fatal: openpty returns device for which ttyname fails." message. Your prior patch from this thread (below) still works fine. JN On Saturday 06 March 2010 12:41:59 pm John Nielsen wrote: > On Saturday 06 March 2010 03:12:38 Ed Schouten wrote: > > Behold, another way to fix this. Still not beautiful, but in my > > opinion not too bad. > > Pretty or not the hack does the job. Thanks again! > > > Index: sys/compat/linprocfs/linprocfs.c > > =================================================================== > > > --- sys/compat/linprocfs/linprocfs.c (revision 204763) > > +++ sys/compat/linprocfs/linprocfs.c (working copy) > > @@ -1312,6 +1312,8 @@ > > NULL, NULL, NULL, PFS_RD); > > pfs_create_file(dir, "status", &linprocfs_doprocstatus, > > NULL, NULL, NULL, PFS_RD); > > + /* XXX: Hack to make ttyname() work. */ > > + pfs_create_file(dir, "fd", NULL, NULL, NULL, NULL, PFS_RD); > > > > /* /proc/scsi/... */ > > dir = pfs_create_dir(root, "scsi", NULL, NULL, NULL, 0); > > > > This creates a bogus file called /proc/%d/fd. Because of this, the > > readlink() call will return ENOTDIR.