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. > > This is a documented requirement: > [...] > > Source: https://www.musl-libc.org/doc/1.0.0/manual.html > > 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. > > 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