tech-toolchain archive

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

Re: $ORIGIN



On Sun, Jan 26, 2014 at 11:54:07AM +0000, David Laight wrote:
 > The problem with caching the path is that it might contain symlinks
 > that the user can change - which means that it isn't save to use
 > $ORIGIN in suid binaries.
 > 
 > Whereas the kernel has vnode of the directory where the file has found,
 > so should be able to refcount it. An open relative to that vnode is
 > safe (and fast) even for suid programs.

Unfortunately, the ELF $ORIGIN doesn't work that way.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index