ORIGINAL MESSAGE:
I'm using the environment variable LD_LIBRARY_PATH to specify where some of
my shared object modules reside (.so) for my C and FORTRAN processes.
Everything works fine until I "su" to root.
Although I've done an export on LD_LIBRARY_PATH, it (and several other
environment variables) don't make it when I become root. I believe this
"feature" has something to do with security, or is some mechanism to keep me
from blowing off my foot. But, I really need LD_LIBRARY_PATH to be set
properly.
Any ideas?
ANSWER(S):
I used the following suggestion from Frank Wortner::
You could try rebuilding your C and FORTRAN shared objects (".so") files and
specifying the "-soname" option. When you link your executable, the full
pathname for the ".so" file will be recorded in the executable, and you
won't need to set LD_LIBRARY_PATH at all.
ld -shared -soname /some/path/name.so obj.o -o name.so
BTW, you're right: ignoring and/or not propagating LD_LIBRARY_PATH through
su is a security feature.
Thanks also to:
Dale Inman
Piotr Bienias
Alethia Dunn
Received on Thu Jul 15 1999 - 22:36:48 NZST