Date: Sat, 6 Mar 2010 09:12:38 +0100 From: Ed Schouten <ed@80386.nl> To: John Nielsen <lists@jnielsen.net> Cc: Alexander Leidinger <Alexander@leidinger.net>, freebsd-emulation@freebsd.org Subject: Re: linux-only jail possible? Message-ID: <20100306081238.GF8200@hoeg.nl> In-Reply-To: <20100306073117.GE8200@hoeg.nl> References: <201003021325.27197.lists@jnielsen.net> <20100305092611.0000772c@unknown> <20100305091446.GZ8200@hoeg.nl> <201003060113.32628.lists@jnielsen.net> <20100306073117.GE8200@hoeg.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
--Vvnl3ADXqZOiRkS3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Ed Schouten <ed@80386.nl> wrote: > Unfortunately it doesn't contain any open() calls on /dev/ptmx, but I > found a way to `fix' it: >=20 > <snip> Behold, another way to fix this. Still not beautiful, but in my opinion not too bad. Index: sys/compat/linprocfs/linprocfs.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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); =20 /* /proc/scsi/... */ dir =3D 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. --=20 Ed Schouten <ed@80386.nl> WWW: http://80386.nl/ --Vvnl3ADXqZOiRkS3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkuSDnYACgkQ52SDGA2eCwUYGQCeMkbklLSMtYk14dPmoYK4xKje 9WQAn2R9U+rvlxwtAfSpm1/66PrSRP1U =PZ6f -----END PGP SIGNATURE----- --Vvnl3ADXqZOiRkS3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100306081238.GF8200>