tech-kern archive

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

Re: namei and path canonicalization

On Tue, Nov 07, 2017 at 11:11:16PM +0000, Christos Zoulas wrote:
 > In article <>,
 > David Holland  <> wrote:
 > >
 > >Also it occurs to me that there's no reason for the kernel to do the
 > >getcwd call; it should just provide the argument given to exec in all
 > >cases, and can do the getcwd call itself if necessary (if the
 > >string it finds doesn't begin with '/') when/if something uses
 > >$ORIGIN.
 > The kernel does not need to do the getcwd() call, but someone (rtld) will
 > eventually do it for $ORIGIN, either lazily or always.

Right -- hopefully it can be done lazily, i.e. often not at all.

 > As for killing $ORIGIN for setuid programs, this is already in the ELF
 > specification:

Sure, but shouldn't we also not pass AT_SUN_EXECNAME for setugid programs?

David A. Holland

Home | Main Index | Thread Index | Old Index