tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: $ORIGIN (was: Re: make: ensure ${.MAKE} works)

On Thu, Apr 22, 2010 at 10:05:45AM -0400, Christos Zoulas wrote:
 > | For the time being what we can do is take the path sent back from
 > | namei, and if it's not absolute call getcwd and graft that onto the
 > | front. This will in general yield a partially realpath'd path but I
 > | don't think anyone will care.
 > I agree, but remember to handle the emul root.

I don't think it can be currently - we'll get whatever path getcwd
finds, which from a quick inspection will always go up to the real
root, and trying to mask the emulation root out of that afterwards is
a lost cause. Might be workable to teach getcwd to stop at the
emulation root on request.

OTOH I'm not at all sure whether $ORIGIN shouldn't be given a path
from the real root anyway.

 > | In the long run I think a fully realpath'd path can be arranged,
 > | either by calling getcwd first and handing the results to namei to
 > | grind on, or by explicitly compacting any ..'s that appear in the
 > | front of the namei result. I sort of favor the first because it makes
 > | it possible to handle the emulation root properly, I think, but this
 > | can be discussed later on.
 > Yes, although I hate doing string manipulations in the kernel.

It's nothing we aren't committed to already :-/

David A. Holland

Home | Main Index | Thread Index | Old Index