Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160607011538.GU10893@brightrain.aerifal.cx>
Date: Mon, 6 Jun 2016 21:15:39 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: realpath() depends on a mounted /proc to work

On Tue, Jun 07, 2016 at 08:27:18AM +0800, Lei Zhang wrote:
> Hi,
> 
> I observed that realpath() doesn't work correctly without a mounted
> /proc while experimenting in a chroot system, where musl is the
> default libc. OTOH, the same program statically linked against glibc
> worked just as expected.
> 
> Is the dependence on a mounted /proc intentional? Then what's the
> rationale behind it?

As a whole, musl depends on having /proc; the rationale is simply that
Linux does not expose all the functionality needed to implement POSIX
without /proc.

As for realpath, it could be done without /proc, but being that musl
already requires /proc for full functionality, and that non-/proc
versions of realpath are significantly heavier, more complex, and less
reliable, simply using /proc for realpath was the natural choice.

If someone wants to do a survey of what functionality actually depends
on /proc, we could document that and also evaluate whether realpath is
sufficiently more "basic" than other things which need /proc that we
might want to consider having a fallback implementation for when /proc
is missign.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.