tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: Saving the Environment (variables)
@ 1999-07-15 22:34 Eiler, James A.
  0 siblings, 0 replies; only message in thread
From: Eiler, James A. @ 1999-07-15 22:34 UTC (permalink / raw)
  To: tru64-unix-managers

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-07-15 22:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-07-15 22:34 SUMMARY: Saving the Environment (variables) Eiler, James A.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox