From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14790 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Reiner Herrmann Newsgroups: gmane.linux.lib.musl.general Subject: Re: realpath after chroot Date: Tue, 8 Oct 2019 19:49:55 +0200 Message-ID: <20191008174955.GI8814@reiner-h.de> References: <20191008172402.GH8814@reiner-h.de> <20191008173850.GA16318@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1DJquaBdcXeJgGJw" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="79532"; mail-complaints-to="usenet@blaine.gmane.org" Cc: musl@lists.openwall.com To: Rich Felker Original-X-From: musl-return-14806-gllmg-musl=m.gmane.org@lists.openwall.com Tue Oct 08 19:50:11 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1iHtcg-000KZC-VF for gllmg-musl@m.gmane.org; Tue, 08 Oct 2019 19:50:11 +0200 Original-Received: (qmail 25618 invoked by uid 550); 8 Oct 2019 17:50:07 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 25600 invoked from network); 8 Oct 2019 17:50:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=reiner-h.de; s=mail; t=1570556996; bh=NydNVu9EWZGUkhllYRSW4xc3U3c1es5i6RIJd1WXrxg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kE3rvuZQpcwCvMmtribdaFsiUJNmx2iqEIkOy5FksdcDa3T8WHhHDp9RfoAQ+CHrR iMi700inJTGXXNPdzmx8jYGrMmItj/Img6eMCUnJ4tUC5RPcW1hvoXyUGhi/xOWzVd M5YCzQk2+DaQqpc9IctkCGJZ+aP4OOjGgIqxPj9U= Content-Disposition: inline In-Reply-To: <20191008173850.GA16318@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:14790 Archived-At: --1DJquaBdcXeJgGJw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 08, 2019 at 01:38:50PM -0400, Rich Felker wrote: > > I noticed that realpath is no longer working after chroot is called. >=20 > This is a documented requirement: >=20 [...] >=20 > Source: https://www.musl-libc.org/doc/1.0.0/manual.html >=20 > It's been discussed in more depth in other places. Basically, Linux > makes it impossible to do some things needed for a fully working > C/POSIX implementation without /proc, so we have to treat it as a > "requirement". Some subset of functionality works without it, but no > formal specification of exactly what works is made by musl. >=20 > For realpath, indeed it can be implemented in userspace without /proc, > and it may be desirable to do so as a fallback. It might make sense to > do an analysis of "how essential" /proc still is on reasonably recent > kernels; if the need for it is isolated to dynamic linker stuff (rpath > origin, etc.) then it might make a lot of sense to formalize that > /proc is only mandatory for certain things. Interesting, thank you for the explanation. For a daemon that chroots somewhere I then need to either mount proc into the chroot or avoid realpath. Regards, Reiner --1DJquaBdcXeJgGJw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE2Pb6feok2Q1urHM7zPBJKNsO6qcFAl2czD8ACgkQzPBJKNsO 6qcVjxAAjzXWU6SkkDCRTI0qC/Pcs9jleu3Pqe8QgDC/q1lUhfAlQCVP5uJVsFfl nthqcJgPkx2kXSGsc3sHhcTCl+STcmeOwFVInAHo/KBsXKMwSJ2H9JL2mGOLER5I Wq5/g6lu1hcFrWby7s9Q4+PdzIi0Qdufjp/7z1yFduVjNjeuvve11+sYPoN8Tbn6 Oe4SLlm0TxEJMhl/GYN1o2dH9GB6cUgFG4SDmnRghkZLQwW9gS1EKY5bqfYDIQlk xwhuhl4UiB+lPmowYBc9JBZ7yNJzr1HHZl85dBtyXBB4RyNfxQOGiug0ItRPL/Dl j4+9km3Jay3tp25+xdQvZl/gJ1tfqb8ehHizeuq38LxqaAUY7O2N7TTTnnea0WzM uXPH2sP85c30Bzny1W+UQJXrQWVwCkU1+JuPL3cp22UiY4PZMyGLxo08MYDhky2V P1hcLVGbF/ObHS3NLcur8bGQXYKaP3Vr+jpKKwTQEdYMGnyphfsu0+ACVz4/rAvz 5w5B6aXRFJQxWfusyK8ouPlJ3O1S9zEgKwxVLBf6spJIiJVMJZj39qHj4/JXyS/B +2KUYBa/JIqWXZL5mSCMpjuCA5qGq8+7TsNkfBucVC1YCypycKJffYLs7oO+LNZe pU8v+eCRAAucGroYBITxIrFVcrlStuN6qduDgzV74mLqJLyqag4= =abEb -----END PGP SIGNATURE----- --1DJquaBdcXeJgGJw--